ESB is traditional middleware used in SOA solutions for routing, message transformation, protocol bridging, among other things. A new category of middleware solutions called API Gateway are now offered by several vendors. These solutions are commonly described as the central point to access the REST and SOAP services offered publicly by an organization. However, API Gateway solutions seem to offer a subset of typical ESB features.
So, what are the differences between ESB and API Gateway? When should I use one or the other?
There are two stark differences between the world of APIs and the world of ESBs: APIs are consumption-centric, whereas services exposed through ESBs are exposure/reuse focused.
MuleSoft's industry-leading API management platform provides end-to-end, enterprise-grade security, including a high-performance API gateway component. The API gateway points to the backend APIs and services that you define and abstracts them into a layer that Anypoint Platform manages.
They go together - an API is functional definition of an Integration endpoint, while API Gateway Server is a middleware runtime component where APIs are run/hosted to be consumed by requesting applications and systems.
An enterprise service bus (ESB) is a software platform used to distribute work among connected components of an application. It is designed to provide a uniform means of moving work, offering applications the ability to connect to the ESB and subscribe to messages based on simple structural and business policy rules.
An API Gateway is a proxy provided for the client. The Gateway gives the client a consistent interface regardless of any changes within the internal system. It allows the internal system to change without affecting the client. The API Gateway can also provide consistent cross-cutting concerns such as security logging, reporting and API analytics.
An ESB (Enterprise Service Bus) provides a means for service-to-service communication. With this technique, services do not need to communicate with each other, reducing coupling. ESBs often use guaranteed messaging for inter-service communication.
Today, the Service Mesh pattern has become popular for microservices. A Service Mesh implementation can provide both an API Gateway and service-to-service communication, along with load balancing, security and many other features.
There are a lot of variations and implementation details, but this is the high-level difference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With