The API gateway is the component responsible for routing external communications. For example, the API gateway handles chatbot connections, purchase orders and visits to specific pages. Conversely, the service mesh is responsible for internal communications in the system.