ColdFusion Nginx Connector – Initial Performance Numbers

We recently announced the availability of Nginx connector for ColdFusion 2016. This post talks about the initial performance numbers we have seen with ColdFusion and Nginx. The numbers seen are only indicative. Continued efforts are being put to improve performance on Nginx Connectors.

The Specifics on installing and configuring connector are listed in the following document,
http://cfdownload.adobe.com/pub/adobe/coldfusion/nginx/prerelease/v7/Configuring_Nginx_with_ColdFusion.pdf

 

Nginx Optimizations:
Before collecting performance numbers, a handful of optimizations were done to the Nginx Configurations. The Nginx Tuning Guide was referred before making these changes.

  • Updating the number of worker processes to use one worker per CPU.
    • worker_processes  auto;
  • Worker connections count updated to an appropriate value.
    • worker_connections 1024;
  • Keep Alive request count updated to 150.
    • keepalive_requests  150;
  • Connection queue size updated in /etc/sysctl.conf,
    • net.core.somaxconn = 65536
    • net.ipv4.tcp_max_tw_buckets = 1440000

 

Baselines and Performance Numbers:

To comparatively measure the performance of the Nginx connector, we collected baselines for the following configurations:

  • ColdFusion – Vanilla ColdFusion 2016 with requests served by the bundled Tomcat server.
  • Nginx Proxy – The traditional method to configure ColdFusion with Nginx. The nginx.conf file used for this purpose can be downloaded here.  
  • Apache Connector – Amongst the supported webservers, Apache connector is the most suitable due to parity with platforms.

Baselines were captured for two CFM pages, one, a simple Hello World, and another, a more complex CFM page which uses getRealPath, CGI variables, references static content and invokes a CFC via REST.

All requests were executed with 100 concurrent threads for the duration of 180 seconds and averaged over 3 executions. The results are listed below.

 

Simple CFM – Hello World     

 

Throughput
(req/sec)

ART
(ms)

ColdFusion

10088.80

8.67

Nginx Proxy

10301.27

9

Apache Connector

9933.70

9.33

Nginx Connector

9427.77

9.66

Nginx Connector with CFM handler only

10097.13

9

 

Complex CFM – Includes static content, getRealPath, CGI, POST Request

 

Throughput
(req/sec)

ART
(ms)

ColdFusion

36.90

2658.67

Nginx Proxy

37.13

2650.67

Apache Connector

37.53

2620.33

Nginx Connector

37.37

2635.67

 

 

 

 

 

 

 

Going by the initial numbers, performance on Apache stands uncontested. Nginx Proxy shows better performance than the Nginx connector when smaller payloads are being processed, with ColdFusion doing all the processing. This is because ColdFusion registers a large number of handlers, as seen in the connector configuration file, ‘ajp_location.conf’. Having only the CFM handler registered, results in numbers very similar to Nginx Proxy.

The other benefits that the Nginx connector provides, that Nginx Proxy does not, are CGI scope variables support and Search-Engine-Safe URL support. Additional restrictions such as having a unified webroot for ColdFusion and Nginx also come into play with Nginx Proxy, making it an impractical solution for deployments.

While we continue to work on the connector performance, do share your feedback and inputs on using the Nginx connector.