0

How can one reduce latency with the mandatory multiple hops in a microservices architecture for north south traffic, i.e., Front End -> API Gateway --> Backend for Front End -> Service Layer --> Backend

For East West Traffic, asynchronous communications, event brokers such as kafka can be used.

However, for north south traffic, synchronous communications, latency due to the many hops between the different components are not addressed.

Any tips on how to reduce latency for such north south multiple hops traffic, please?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Nathan Aw
  • 545
  • 5
  • 18
  • Are you using security? Trace logging? Distributed Tracing? Injecting middleware? Compression plaintext protocols? All these add latency, so remove or improve them... As is, the question is too vague – OneCricketeer Feb 25 '20 at 02:48

2 Answers2

0

Good morning. I assume API Gateway and Backend For Forntend are the same.

A. UI -> B. API Gateway -> C. MiddleTier/Backend Services -> D. Cache Layer -> E. Database.

Below are few points to consider. These should be based on the content, how constant they are. 1. You can have the content cached at UI, so there will not be calls to Server. 2. You can Cache the content at the Middle Tier/Backend Services Layer. 3. You can have a Cache Layer, this will help not reaching database.

URL: https://dotnet.microsoft.com/download/e-book/microservices-architecture/pdf

Image from Microsoft's eBook

Viswanatha Swamy
  • 699
  • 1
  • 10
  • 17
0

Ever play Transport Tycoon?

  • Acquire more units which deliver product.

  • Reduce the size of the load.

  • Set up proxy operations in between long-distance destinations which middle-man deliveries.

Or my favorite...

  • Integrate the process to completely eliminate delivery.

Since distributed processes are natural, the real work and gains to be had is from integrating them.

RBJ
  • 128
  • 6
  • that sounds like a monolithic application... sigh its not easy to design something that has everything – Nathan Aw Apr 02 '20 at 09:35
  • But a manufacturing plant is not monolithic. It has everything and can easily grow or be reshaped. There are consequences for modeling processes without knowing the ramifications of centralization and distributed manufacturing. My articles on powersemantics.com teach these fundamentals you won't learn in school. I am the expert on this subject. Eliminating problematic latency is a reason to integrate. Stateless code (microservice) is incapable of the same solutions to logistics problems that work for real services. The problem is the stateless, distributed model. – RBJ Apr 07 '20 at 16:11