Logo

Pasted image 20240725191422.png

Load Balancer / API Gateway handles request from multiple sources and redirects it onto needed Server from a cluster of endpoints

Done In ways such as:

  1. Using fixed routing

Suppose we route all /customers to one server, /users to another server.
A middle-man API Gateway can route calls to the distributed servers via RPC or HTTP calls
This is an example of a Microservices Architecture

  1. Using some hash function in range [0,N] - by modulo

When client requests, a hash function maps (randomly) to any one of the N servers. And the request is redirected to that server.

This way is good but has issues like:

  1. Handling Failures 2) Even Distribution of load

An alternative for that becomes using something like Consistent Hashing

© 2025 All rights reservedBuilt with DataHub Cloud

Built with LogoDataHub Cloud