After debunking gateways in detail lets come back to our shopping cart microservices system. We will look at the need for a gateway in our system and the things it will handle with our context and then move on to design the gateway. In this section, we will look at various design aspects that we need to consider while designing the gateway.
Being an entry point in system performance, scalability and high availability of API Gateway is a very crucial factor. As it will handle all the requests, making it on asynchronous non-blocking I/O seems very logical which is what Node.js is. All the requests coming from our shopping cart microservices need to be authenticated, cached, monitored and constantly send out health aware checks. Consider a scenario where our products service has larg traffic. API Gateway should then automatically spawn new instances of the server and maintain addresses of the new instances...