APISIX: An API Gateway the Apache Way

During the pioneer area of the World Wide Web, the content was static. To serve it, a group of developers created a web server, which is now known as the Apache Web Server.

The Apache Web Server is built around a module architecture. Developers created a module to run CGI scripts to add dynamic content to the lot. Users wrote early CGI scripts in Perl. After a while, it became evident that generating a complete HTML page from scratch was not the best way and that templating - providing an HTML page with placeholders - was a much better approach. The PHP language started like this as a simple templating engine interpreted by a module.

Nginx: Reverse Proxy and Load Balancing

You might have seen many articles on the internet regarding Nginx and how we can use Nginx for load balancing and reverse proxy.  In this article, I would like to share my experience of setting up Nginx for load balancing and reverse proxy with SSL termination in Nginx.

Are Reverse Proxy and Load Balancer Similar?

Though both terminologies sound similar, a reverse proxy accepts requests from clients and forwards the request to servers for the actual processing.  The reverse proxy relays the results from servers to the client. 

How to NGINX Reverse Proxy with Docker Compose

While developing a web application, a common method of calling the application from a local machine is through http://localhost:x ports, which essentially means that we are required to expose several ports to access different modules of the application. In the article below, we will go through the method of using Reverse Proxy to call an application and the benefits of using it.

Why Do We Need Reverse Proxy?

The most obvious reason for using Reverse Proxy is to avoid changing ports every time you try to access different modules of the application through the same URL. Through Reverse Proxy we can reach frontend, backend, or other services without changing port through a single domain. Another important reason for using Reverse Proxy is to mask services behind a proxy and avoid dealing with CORS issues.

What Is a Proxy Server and How Do Proxies Work?

You might have already heard about proxies and proxy servers. But if you aren't entirely familiar with them, this article will help you catch up with this web technology and see all the benefits of using proxy servers. 

What Are Proxies?

A web proxy is some kind of intermediate between a web user and an online resource. When visiting a website directly, you send a web request containing information about yourself (the server or PC that you are using, your location, browser fingerprints, IP address, etc.). As a response to this data sent, the web resource provides you with the content you requested.

How to Install Payara 5 With NGINX and Let’s Encrypt Over Oracle Linux 7.x

From field experience, I must affirm that one of the greatest and stable combinations I've seen is Java Application Servers + Reverse Proxies. Although some of the functionality is a clear overlap, I tend to put reverse proxies in front of application servers for the following reasons (please see this NGINX page for more details):

  • Load balancing: The reverse proxy acts as a traffic cop and could be used as an API gateway for clustered instances/backing services
  • Web acceleration: Most of our modern applications use SPA frameworks, hence it is worth caching all the JS/CSS/HTML files and freeing the application server from that responsibility
  • Security: Most HTTP requests could be intercepted by the reverse proxy before any attempt against the application server, increasing the opportunity to define rules
  • SSL Management: It is easier to install/manage/deploy OpenSSL certificates in Apache/NGINX compared to Java KeyStores. Besides this, Let's Encrypt officially supports NGINX with plugins.

Requirements

To demonstrate this functionality, this tutorial combines the following stack in a classic (non-Docker) way, though most of the concepts could be useful for Docker deployments: