Credit: Galina Pankratova
Looking to take some complexity out of microservices deployments, LunchBadger has built an open source API gateway to secure microservices and expose them via APIs. Built on the Express web application framework for Node.js, the Express Gateway routes requests to services using Node.js and Express middleware.
Express Gateway offers centralized configuration, API consumer and credentials management, and a plug-in framework. An API gateway is the heart of microservices, LunchBadger CEO Al Tsang said. “It’s a key piece of infrastructure that you must have,” enabling microservices to work with infrastructure such as Kubernetes container orchestration, Tsang said. LunchBadger offers an API and microservices platform. Joyent also is sponsoring the gateway.
Available as an NPM module, the Express Gateway features a CLI, a REST API, and a distributed data store. It is intended to work with any language, framework, and microservices use case. The gateway turns Express into a dynamic runtime engine. Application configuration for API use cases are centralized in a single YAML or JSON file. Also featured in the gateway is a component to register consumers of the APIs. Application data is stored centrally in a traditional or distributed data store. Data can be accessed globally, with developers able to build to scale with multiple instances of the gateway. Application configuration can be centralized even across a gateway cluster.
Express Gateway plug-ins wrap policies, pipelines, conditions, and actions around Express middleware. When a request comes through an API endpoint, the Express router connects the API endpoint to a policy-applying pipeline. If a condition is met, a corresponding action is taken by the Express middleware. After all of the policies in a pipeline have been passed, the request is usually proxied to an underlying microservice, which then applies the business logic and sends a response to the API consumer.
Sign up for CIO Asia eNewsletters.