Powering API Gateways with OpenResty

In our previous recipe, we explored a basic microservice to look up DNS records. While this can be limited per service to prevent abuse, ideally, we want to configure a centralized point to manage this. Otherwise, any limits across multiple services will not be considered as a whole and will need to be individually implemented per service. The following figure explains the differences:

To build a centralized API gateway, we need to consider the following points:

  • Authentication
  • Request routing
  • Rate limiting
  • Load balancing
  • Security
  • Logging

This recipe will cover a basic implementation of an API gateway ...

Get NGINX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.