> For the complete documentation index, see [llms.txt](https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/event-driven-architecture/event-driven-architecture-aligning-technology-with-business-outcomes/day-2-7-optimizing-cost-of-change.md).

# Day 2/7 Optimizing Cost of Change

Day 2 of 7: A concrete financial and technical comparison proving how EDA slashes infrastructure and operational costs compared to legacy REST architectures at scale.

**Application Host Count**

* EDA: A single event bus can handle up to 200,000 concurrent connections.
* REST: To manage the same number of connections, 400 web servers are necessary, with each server supporting only 500 connections concurrently.

**Network Infrastructure**

* EDA: The Event Bus's non-exclusive queue enables an Active-Active consumer model, eliminating the need for additional load balancers.
* REST: Separate load balancers are vital for the Web Server, Channel Application Server, and Backend Server within the REST framework.

**Bandwidth**

* EDA: MQTT, a lightweight protocol with persistent connections, is employed.
* REST: The REST solution requires appending authentication data to each message, resulting in message sizes approximately 10 times larger than MQTT.

**Operating Costs** Operational expenses are influenced by hosting and network equipment requirements, including factors like power consumption and data center space. The EDA solution proves more cost-effective than REST, as one event bus is equivalent to 400 web servers and 30-40 application servers.

**Internal Efforts** Project implementation, solution design, development, testing, and interface maintenance constitute internal efforts, varying based on system complexity and network infrastructure. EDA's system decoupling minimizes change scope, while REST's tightly coupled systems demand redundant logic across different channel application servers, leading to increased efforts in architecture design, development, and testing compared to the EDA solution.

Comparing the cost implications for supporting 200,000 concurrent connections in real-time operations using two distinct approaches: REST and EDA.

**Assumption**

* 3 Channels (2 Mobile Apps and one Browser)
* 200,000 concurrent connections
* 10 Operations (e.g. Account Opening, Account Enquiry, etc.)
* REST message size: 100Kb, EDA MQTT message size: 10Kb (10% of REST message)

<figure><img src="https://2617374589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcQN1DZY6gJZPxlsQf9Re%2Fuploads%2FAF8fot7KMOXArfQEStJ7%2Fimage.png?alt=media&amp;token=158db072-f150-4263-9351-c8e847685e3e" alt=""><figcaption></figcaption></figure>

## 🚀 Let's Connect Beyond GitBook!

If you found this article helpful, you can find more of my technical insights, daily discussions, and deep dives across these platforms:

* **Read more of my work:** Check out my articles on [dev.to](https://dev.to/stephen_tsoi_5b2c4055f3a9) and [Hashnode](https://stephentsoi.hashnode.dev/).
* **Join the daily conversation:** Connect with me directly on [LinkedIn](https://www.linkedin.com/in/stephen-tsoi-16309730/).

***

#### 📬 Stay Ahead of the Curve

Enjoyed this piece? I break down complex technical topics into bite-sized, actionable insights every week.

👉 **Subscribe to my** [**LinkedIn Newsletter**](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7487299517642612736) to never miss an update and get the latest articles delivered straight to your feed!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/event-driven-architecture/event-driven-architecture-aligning-technology-with-business-outcomes/day-2-7-optimizing-cost-of-change.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
