# Scaling TX Text Control Document Editor Applications

> Learn how to scale TX Text Control Document Editor applications effectively for enhanced performance and user experience. A practical guide for high performance architectures.

- **Author:** Bjoern Meyer
- **Published:** 2025-12-01
- **Modified:** 2026-07-17
- **Description:** Learn how to scale TX Text Control Document Editor applications effectively for enhanced performance and user experience. A practical guide for high performance architectures.
- **5 min read** (941 words)
- **Tags:**
  - ASP.NET Core
  - ASP.NET
  - Conference
- **Web URL:** https://www.textcontrol.com/blog/2025/12/01/scaling-tx-text-control-document-editor-applications/
- **LLMs URL:** https://www.textcontrol.com/blog/2025/12/01/scaling-tx-text-control-document-editor-applications/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2025/12/01/scaling-tx-text-control-document-editor-applications/llms-full.txt

---

Applications built with TX Text Control perform exceptionally well on a single server. A typical deployment combines the *WebSocketHandler* with TXWebSocketMiddleware and the *TXTextControl.Web.Server.Core* backend service, as well as server-side document processing with ServerTextControl and MailMerge. All components run in a single instance, and the entire workflow, from the browser-based document editor to PDF creation, works seamlessly.

> **Learn more**
> 
> With the release of TX Text Control 33.0, we are excited to introduce TXTextControl.Web.Server.Core, a major upgrade in the way the document editor works on the backend. This article provides an overview of the new architecture and how to deploy the backend on Linux using Docker.
> 
> [Introducing TXTextControl.Web.Server.Core: A Cross-Platform Backend for TX Text Control Document Editor](https://www.textcontrol.com/blog/2025/03/13/introducing-txtextcontrol-web-server-core-a-cross-platform-backend-for-tx-text-control-document-editor/llms-full.txt)

As soon as the application grows and the number of concurrent users increases, it becomes important to reconsider this architecture. Document processing is a computationally intensive operation that consumes memory and CPU, and each Document Editor session requires backend resources. When these workloads occur on the same machine, they can affect each other. Users who simply open or edit a document may experience slower load times if another request triggers PDF generation or complex mail merge operations. To avoid this behavior and support predictable performance at scale, we recommend separating the core components into independent services.

### Recommended Architecture for Scalable Deployments

Clearly separating editing, synchronization, and document processing allows each component to grow independently. This architecture fully aligns with our recommendations for cloud-native deployments across Windows or Linux. It works with virtual machines (VMs), Kubernetes, containers, and server farms.

This architecture provides a robust foundation for scaling TX Text Control document editor applications. By separating real-time editing from intensive document processing, consistent performance and a responsive user experience are ensured, even as the user base grows. The following diagram illustrates the recommended setup:

[![Architecture Diagram](https://s1-www.textcontrol.com/assets/dist/blog/2025/12/01/a/assets/architecture.webp "Architecture Diagram")](https://s1-www.textcontrol.com/assets/dist/blog/2025/12/01/a/assets/architecture.webp)

The architecture consists of three main components:

1. **Application instance hosting TXWebSocketMiddleware**  
    This instance communicates with the client-side document editor via WebSockets. It synchronizes editing, selection changes, typing, and rendering with the backend Web Server. Depending on the project setup, this server can also serve the web application itself. The important point is that it manages user-facing communication, which requires stable, responsive performance. This component should not perform heavy document processing.
2. **TXTextControl.Web.Server.Core backend service**  
    This service is responsible for document synchronization and the internal rendering pipeline. It keeps all active sessions in sync and handles the intensive processes behind cursor movement, spell checking, layout recalculations, and real-time UI feedback. The Web.Server communicates with the *TXTextControl.Web* client via *TXWebSocketMiddleware* and must remain responsive, even under high load. Memory requirements depend on spell checker dictionaries and active sessions. A typical instance requires between 50 and 150 MB per Document Editor session. Eight or more cores are recommended for parallel processing. With this information, the expected capacity becomes predictable. For example, 50 active Document Editor sessions result in 2.5 and 7.5 GB of memory usage. One hundred sessions may require five to 15 GB. This allows for clear sizing plans in container-based or VM-based scaling scenarios.
3. **Separate document processing application**  
    All server-side document processing tasks, such as PDF generation, *ServerTextControl* operations, batch MailMerge jobs, and conversions, should run in an isolated instance. Depending on the document size or complexity, these tasks can require significant CPU time and memory. Keeping processing separate from the real-time document editor ensures that load spikes caused by generation jobs do not affect new editor sessions or active collaborative editing. Scaling this processing component horizontally is also straightforward. In container-based environments, this service can autoscale independently based on CPU usage or queue depth.

#### Why Separation Matters

Document editing produces predictable, memory-bound work. Document processing, on the other hand, produces unpredictable, CPU-heavy work. Mixing the two on the same machine always creates potential contention. Separating these workloads ensures consistent performance for end users and reduces the risk of blocking WebSocket connections. It also makes deployments more cloud-friendly, as each service can scale independently. In practice, this difference translates to a stable editing experience versus intermittent slowdowns during peak PDF generation times.

#### Load Balancing and Sticky Sessions

In horizontally scaled environments, it is important to configure load balancers to maintain session affinity. A document editor session is tied to a specific backend instance because the web server maintains the live document state. This requires sticky sessions to keep the WebSocket connection connected to the same node.

To connect the WebSocketHandler to a separate *TXTextControl.Web.Server.Core* instance pool, simply provide the IP address of the load balancer or the container instance running the *TXTextControl.Web.Server.Core*.

```
// enable Web Sockets
app.UseWebSockets();

// attach the Text Control WebSocketHandler middleware
app.UseTXWebSocketMiddleware(IPAddress.Parse("14.123.231.1"));
```

### Summary

A scalable TX Text Control deployment consists of three independent services that communicate with each other via lightweight HTTP and WebSocket requests. The front-end application, which uses *TXWebSocketMiddleware*, handles client communication. The backend *TXTextControl.Web.Server.Core* manages all live editing synchronization. The processing service performs heavy document generation tasks. This separation allows the system to grow without creating performance bottlenecks. New Document Editor sessions load instantly, and large MailMerge or PDF creation tasks run on a dedicated processing layer.

This architecture aligns with the principles described in the introduction to *TXTextControl.Web.Server.Core*. It supports single-node development scenarios and scales up to multi-instance production systems on Azure, AWS, Kubernetes, and on-premises environments. It ensures predictable performance, smooth editing, stable WebSocket connections, and fast document generation.

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Silicon Valley, Here We Come!](https://www.textcontrol.com/blog/2026/08/10/silicon-valley-here-we-come/llms.txt)
- [WeAreDevelopers World Congress Europe 2026 Wrap Up: Record Breaking Days in Berlin](https://www.textcontrol.com/blog/2026/07/13/wearedevelopers-world-congress-europe-2026-wrap-up-record-breaking-days-in-berlin/llms.txt)
- [Text Control Expands North American Conference Presence with WeAreDevelopers World Congress North America](https://www.textcontrol.com/blog/2026/06/12/text-control-expands-north-american-conference-presence-with-wearedevelopers-world-congress-north-america/llms.txt)
- [NDC Copenhagen 2026: Great Days in the Heart of Copenhagen's Developer Community](https://www.textcontrol.com/blog/2026/06/05/ndc-copenhagen-2026-great-days-in-the-heart-of-copenhagens-developer-community/llms.txt)
- [We Never Pause - Join Us at NDC Copenhagen 2026](https://www.textcontrol.com/blog/2026/05/27/we-never-pause-join-us-at-ndc-copenhagen-2026/llms.txt)
- [MD DevDays 2026: Record Attendance, Packed Expo Hall, and Three Great Days in Magdeburg](https://www.textcontrol.com/blog/2026/05/21/md-devdays-2026-record-attendance-packed-expo-hall-and-three-great-days-in-magdeburg/llms.txt)
- [Techorama 2026: Welcome to The Document Forge](https://www.textcontrol.com/blog/2026/05/15/techorama-2026-welcome-to-the-document-forge/llms.txt)
- [One More Stop on Our Conference Circus: code.talks 2026](https://www.textcontrol.com/blog/2026/04/17/one-more-stop-on-our-conference-circus-code-talks-2026/llms.txt)
- [Text Control at BASTA! Spring 2026 in Frankfurt](https://www.textcontrol.com/blog/2026/03/06/text-control-at-basta-spring-2026-in-frankfurt/llms.txt)
- [We are Gold Partner at Techorama Belgium 2026](https://www.textcontrol.com/blog/2026/02/26/we-are-gold-partner-techorama-belgium-2026/llms.txt)
- [Text Control Sponsors & Exhibits at BASTA! Spring 2026 in Frankfurt](https://www.textcontrol.com/blog/2026/02/26/text-control-sponsors-exhibits-basta-spring-2026-frankfurt/llms.txt)
- [NDC London 2026 Wrap-Up: Conversations, Community, and a Conference Done Right](https://www.textcontrol.com/blog/2026/02/02/ndc-london-2026-wrap-up-conversations-community-conference-done-right/llms.txt)
- [Procurement Comparison: TX Text Control .NET Server vs Aspose (Words + PDF)](https://www.textcontrol.com/blog/2025/12/24/procurement-comparison-tx-text-control-net-server-vs-aspose-words-pdf/llms.txt)
- [The State of Electronic and Digital Signatures (E-Signatures) in Business Applications (2025)](https://www.textcontrol.com/blog/2025/12/23/the-state-of-electronic-and-digital-signatures-e-signatures-in-business-applications-2025/llms.txt)
- [Looking Ahead: Our Conference Journey in 2026](https://www.textcontrol.com/blog/2025/12/23/looking-ahead-our-conference-journey-in-2026/llms.txt)
- [We are Returning to CodeMash 2026 as a Sponsor and Exhibitor](https://www.textcontrol.com/blog/2025/12/08/we-are-returning-to-codemash-2026-as-a-sponsor-and-exhibitor/llms.txt)
- [Text Control at DDC 2025: Bringing Next-Generation Document Technology to the .NET Community](https://www.textcontrol.com/blog/2025/11/28/text-control-at-ddc-2025-bringing-next-generation-document-technology-to-the-dotnet-community/llms.txt)
- [The Mountains are Calling! Meet Text Control at TechBash 2025](https://www.textcontrol.com/blog/2025/10/15/the-mountains-are-calling-meet-text-control-at-techbash-2025/llms.txt)
- [Meet Text Control at DDC 2025 in Cologne](https://www.textcontrol.com/blog/2025/10/06/meet-text-control-at-ddc-2025-in-cologne/llms.txt)
- [Text Control at NDC Copenhagen Developers Festival 2025](https://www.textcontrol.com/blog/2025/09/15/text-control-at-ndc-copenhagen-developers-festival-2025/llms.txt)
- [Text Control at NDC Copenhagen Developers Festival 2025](https://www.textcontrol.com/blog/2025/08/20/text-control-at-ndc-copenhagen-developers-festival-2025/llms.txt)
- [Back from KCDC 2025 - Some Impressions](https://www.textcontrol.com/blog/2025/08/18/back-from-kcdc-2025-some-impressions/llms.txt)
- [Text Control Sponsors and Exhibits at KCDC 2025 for the First Time](https://www.textcontrol.com/blog/2025/07/18/text-control-sponsors-and-exhibits-at-kcdc-2025-for-the-first-time/llms.txt)
- [What a Week: Text Control at WeAreDevelopers World Congress 2025](https://www.textcontrol.com/blog/2025/07/14/wearedevelopers-world-congress-2025/llms.txt)
- [Hot Code, Hotter Weather: Developer World DWX 2025 in Mannheim](https://www.textcontrol.com/blog/2025/07/04/hot-code-hotter-weather-developer-world-dwx-2025-in-mannheim/llms.txt)
