DZone

What Is WSO2 API MicroGateway (MGW)?

It is a lightweight proxy for your APIs.

Core Features

  • Security via OAuth2, JWT
  • Throttling
  • Usage metering (Analytics)
  • Low resource usage (2CPU, 256 MB RAM)
  • Fast bootup time

When to Use

  • When there is unusual traffic for an API or a set of APIs, you can spawn an MGW to serve traffic during that period without impacting the performance of other APIs
  • When there is a need to run a gateway in a lockdown environment that does not have connectivity to other API management components (e.g. Publisher, Store, KM)
  • When deploying an API gateway within a microservices architecture where gateway acts as a sidecar to the main service (or API)

How API MGW Works

  • API developers use the Publisher interface to create the APIs
  • API admins publish this API
  • API MGW will connect to the API publisher and generate a micro-gw runtime
How WSO2 API Microgateway works

How to Invoke an API

  • Log into the developer-portal (Store) and subscribe to the API through an application
  • Generate an access token (JWT or OAuth2 token)
  • Send the request along with the token

e.g. curl -k -i -H “Authorization: Bearer <JWT_token | OAuth2_token>” <API_url>

Source: DZone