O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

API Gateway versus reverse proxy NGINX

In this section, we are going to look at possible options available at server levels. A reverse proxy (NGINX or Apache httpd) can do tasks like authenticating a request, handling transportation security, and load balancing. NGINX is one of the widely used tools to use a reverse proxy at gateway level in microservices. The following code sample depicts configuration with a reverse proxy, SSL certificates, and load balancing:

#user gateway; worker_processes 1; events {worker_connections 1024;} http {     include mime.types;     default_type application/json;     keepalive_timeout 65;     server {         listen 443 ssl;         server_name yourdomain.com;         ssl_certificate cert.pem;         ssl_certificate_key cert.key; ssl_session_cache shared:SSL:1m; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required