What is the difference between Apache Traffic Server and nginx?
Apache Traffic Server is a web server, as nginx is but it allows you to send all the traffic through http to one machine in the middle which will then be distributed to the other servers behind it.
I believe the way traffic server works is that it has an option to forward specific ports from one server to another and then have an option to forward the connection so the original port can be picked up by another server in the load balancer.
Why would you ever want to put nginx in the middle of your network? If there are many machines behind a web load balancer why wouldn't you just have them all talk directly to the load balancer? Also since Apache Traffic Server can just redirect all ports why would you ever use it, but then have nginx do the same thing? As others have pointed out, they have very different use cases, but for the record, the main difference is that Apache Traffic Server requires all (except for one) TCP connections to be sent to a single address, whereas nginx transparently redirects connections to a random proxy, and the proxy then redirects them to the final destination address. This results in a higher percentage of TCP connections (ie, most HTTP requests), which are usually smaller (ie, less than 64K), being directly handled by the load balancer. In some cases, performance increases can be realized by choosing one or the other instead of doing both.
The reasons why you'd want to choose one rather than the other (other than the ones mentioned in previous answers) are as follows: You may wish to configure only one of the two in some scenarios. For example, for development and staging you might want to configure your Apache instance with your test/live-production SSL certifcates on a different IP/port than when using the production certificates. If your proxies/load balancers will handle direct connections only (with their own certs), this is a good way to "fake" the connection. Of course, you also need a way to determine whether a request is coming from Apache or not, to perform redirects properly if so.
A proxy which forwards certain connections to Apache can act as an intermediate step in your reverse proxy's configuration which you'd like to configure independently of Apache.
What is Apache traffic control?
Apache traffic control allows you to use Apache2 in front of an application, to route specific requests, eg for SSL and other security reasons.
There are several ways to do this: Apache can be used as an Apache proxy server to forward incoming requests to the application, ie to proxy requests to the application. This is done with the ProxyPass directive.
The application itself can be configured to use modproxy (modproxybalancer or modproxyhttp) instead of modproxy. This is done by using a balancer load balancing function (A) or a httpd.conf reverse proxy config (B).
In both cases the requests are processed by a single httpd. If you use a frontend modproxy with a backend modproxy in case of an http load balancer, the latter will always return a HTTP status code 404 when it receives a request that it doesn't know about.
The modproxybalancer directive can be used to configure a single httpd to receive requests on a given port for a range of IP addresses, which will then be forwarded to one or more backends. This is a rather complex topic, so I won't dive into details now. Instead I will try to give you a good introduction of what Apache traffic control is and how it works.
So far, we haven't yet discussed how to select the right Apache directive to handle a specific request. This is done with the modrewrite module. For example, if a web browser requests , then Apache will process the request according to the rewrite rule /foo in the corresponding virtual host configuration file (vhost). The same mechanism works for other requests like , or .
Let's make an example for our scenario: SSL is enabled. uses modproxybalancer and modproxyhttp. With the http server listening on port 9000.
What is the current version of Apache Traffic Server?
Apache Traffic Server 4.
0.9 has been released.
What new features/performance improvements are included in 4. The new release of Apache Traffic Server 4.9 includes: The following new features were added to the latest release: New support for customizing a content cache with different configurations. This release fixes issues with the cssdefault.json and cssminifydefault.json files not working properly. See this issue for more information.
The latest release of Apache Traffic Server 4.9 includes the following performance improvements: Improvements in the way in which TLS session caching is handled have reduced the amount of memory required to store session data by nearly half. The default configuration for the Apache Traffic Server proxy server will now serve as a caching proxy for any requests which are not cached. This ensures that all requests and responses go through Traffic Server. This is helpful if, for example, your web server does not support HTTP caching.
The default cache storage directory is now configurable. Traffic Server will now check to ensure that SSL certificates are signed correctly before serving the certificate from the cache. This helps prevent a common security issue when serving sensitive data over HTTP using SSL.
Support for the modsecurity2 module has been removed from Apache Traffic Server 4. It will be re-released later this year.
What is the future version of Apache Traffic Server? Apache Traffic Server 5.0 is scheduled to be released in August of 2025.
How do I use the proxy server in Apache Traffic Server? Apache Traffic Server allows you to configure your web server to forward specific web requests through the proxy server. The standard default configuration of the proxy server will cache all web content that is served by the web server. To enable caching of specific web content, create a file called
Caching configuration for specific request URLs (using a requestmethodname parameter) is supported. A request method can be specified with either the HTTP protocol or the HTTPS protocol.
Related Answers
Is Spring cloud gateway an API Gateway?
I was reading the Spring Cloud gateway document, and I don't unders...
What is the difference between Apache Traffic Server and squid?
How does it work? Apache is an HTTP server which runs on Linux. It i...
How to configure Apache proxy?
I am trying to setup SSL for my Apache web server and I was...