Simple flowchart from basic to advanced for data request to retrieval from API

KK Ferdousi - Oct 21 - - Dev Community

I want to note down the basic and advanced flowchart of data requests from the client to API and passes back to the client to show the tournament score in the leaderboard.

Basic flowchart:

Image description

Advance design:
For better performance, we can add three more steps, which are:

1. Caching
When data needs to be accessed frequently that time for better performance we can use caching. In this case, firstly, the service will check into the cache, if data is there then it sends data to the client otherwise it will get data from the RSDBMS. For this, we can use Redis or Memcached.

2. API Gateway
We can add API Gateway into our API system for extra protection and make it more manageable. It acts as a single entry point for all client requests. It routes the incoming requests to the appropriate backend service (like the leaderboard service). We can hide internal service architecture from external clients, reducing attack surfaces. Clients only need to interact with one URL, simplifying their logic. We can easily integrate load balancing and failover strategies at the gateway level.

3. Load Balancing
It sits between the client and the servers. It receives incoming requests from clients. It distributes requests evenly and prevents server overloads. If one server fails, it automatically redirects traffic to other available servers, ensuring the service remains available. By routing traffic based on server response times and load, a load balancer can reduce latency and improve the application's response time for users.

Advance flowchart:

Image description

.
Terabox Video Player