How does the microservice API gateway pattern work with auto Horizontal scaling?
If I would like to have a high available solution. So, I would have two API gateways in different data center.
Each API gateway is connected to three microservices like billing, users, and account services. Each one has three replica.
So is that true to have 6 copies for one microservice, and if not. How does it work?
2 Solutions collect form web for “How does the microservice API gateway pattern work with auto Horizontal scaling?”
In this scenario you’d want to deploy a single Kong cluster across multiple data centers – have a look at https://getkong.org/docs/0.10.x/clustering/
Kong supports two datastores (Postgres and Cassandra) you’d probably want to pick Cassandra, but you could make Postgres work – have a look at https://getkong.org/docs/0.10.x/configuration/#datastore-section
The API gateway model is a scalable solution for microservice based architectures.
You have the gateway distributed over 2 data-centres which helps provide High Availability to the gateway – you could even consider spreading it over 3 for full multi-region in the future.
If your microservices each have a replica of 3 and they are distributed into the 2 data-centres then yes you have 6 instances of that microservice running however unless you have the two data-centres sharing resources then it is 3 of each microservice in each data-centre.