> 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-3-7-maintaining-low-latency-for-information-distribution-and-real-time-responses.md).

# Day 3/7 Maintaining Low Latency for Information Distribution and Real-Time Responses

Day 3 of 7: Discover how replacing slow REST polling loops with real-time push events cuts data distribution latency from 14 seconds to under 2 seconds.

The Event-Driven Architecture (EDA) offers a significant reduction in end-to-end latency, benefiting both Information Distribution and Real-Time Operation.\
\
**\*\*Information Distribution\*\* 🥑**\
In traditional REST Polling Architectures, channels typically rely on caching layers to format and tailor data, leading to increased latency. Alternatively, leveraging Content Delivery Networks (CDNs) to cache information can reduce backend traffic impact, although this introduces additional latency based on page TTL and update frequency. Clients must regularly poll the web server for updates, adding to latency.\
\
Under the EDA design, the backed source provider will immediately publish the delta information as a separated event to the event bus when the data is changed, and client will directly subscribe corresponding events via the event bus. There is not any cache layer between the client and data source provider, and the client performance will be increased due to less frequence data reloading.\
\
Transitioning to the EDA model showcased in the infrastructure diagram can notably reduce latency from 14 seconds to 2 seconds or less.\
\
**\*\*Real-Time Operation\*\* 🥑**\
Even without CDN involvement, requests still pass through Channel Web and Application Servers before reaching the backend, incurring processing time.\
\
In the EDA framework, the backend service provider directly exposes service calls to clients via the event bus, enabling immediate request/response interactions. This setup is poised to reduce latency by at least 20%.\
\
Comparatively, in the context of the previous post "REST vs. MQTT" \[<https://lnkd.in/guCgwneg>\
], MQTT outperforms REST due to its data exchange relying on persistent connections rather than initiating connection and authentication verification with each REST call.

<figure><img src="https://2617374589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcQN1DZY6gJZPxlsQf9Re%2Fuploads%2FRZBbZFiiZuUAYdYxnvbZ%2Fimage.png?alt=media&amp;token=2e12141d-e8ce-4c09-aa54-ef9a31e64ad2" 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-3-7-maintaining-low-latency-for-information-distribution-and-real-time-responses.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.
