Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Benchmark - Apache Vs. Nginx Rate Topic   - - - - -

Poll: Apache vs Nginx (20 member(s) have cast votes)

My CS-Cart is running on:

  1. Apache server (3 votes [15.00%] - View)

    Percentage of vote: 15.00%

  2. Nginx server (8 votes [40.00%] - View)

    Percentage of vote: 40.00%

  3. Nginx in front of Apache (9 votes [45.00%] - View)

    Percentage of vote: 45.00%

  4. I don't know (0 votes [0.00%])

    Percentage of vote: 0.00%

Vote Guests cannot vote
 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 558 posts

Posted 02 February 2017 - 10:03 AM #1

Hello to CS-Cart team and everyone who's using CS-Cart.

 

Could you provide some benchmarks of CS-Carts tested at both environments and your experience with installed CS-Cart on Apache or NGINX server?


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 02 February 2017 - 10:23 AM #2

At this moment in time and am using our CS Cart stores on a Cpanel server running Nginx as a proxy (not doing very good job at it but that might be a config issue).


running CS Cart V4.10.3.SP1 


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11400 posts

Posted 02 February 2017 - 07:14 PM #3

Ngnix is going to help when a server runs under load.  The vast majority of cs-cart stores run maybe 1-2 concurrent users.  Hence, I'd expect any result to be minuscule. Put your energy into marketing, then solve the load problem when you have one! :-)


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 558 posts

Posted 02 February 2017 - 07:28 PM #4

Ngnix is going to help when a server runs under load.  The vast majority of cs-cart stores run maybe 1-2 concurrent users.  Hence, I'd expect any result to be minuscule. Put your energy into marketing, then solve the load problem when you have one! :-)

 

Agree... secondly, who of the people here knows, WHAT is nginx really doing?


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • abolshakov
  • Architect
  • CS-Cart Architects
  • Join Date: 20-Aug 14
  • 93 posts

Posted 02 February 2017 - 09:55 PM #5

Personally I prefer NGINX for its configuration syntax and low exclusive memory usage under high request concurrency.

 

However some of my colleagues claim that well-tuned Apache httpd can be as good as nginx under load. I usually don't bother myself with debates.


Alexander Bolshakov
CS-Cart Architect Team


 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 558 posts

Posted 02 February 2017 - 10:07 PM #6

Personally I prefer NGINX for its configuration syntax and low exclusive memory usage under high request concurrency.

 

 

...for static pages yes... not for php parsed results...


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 991 posts

Posted 02 February 2017 - 10:10 PM #7

Ngnix is going to help when a server runs under load.  The vast majority of cs-cart stores run maybe 1-2 concurrent users.  Hence, I'd expect any result to be minuscule. Put your energy into marketing, then solve the load problem when you have one! :-)

 

Tony

 

You must have just more than 2 concurrent users on your CS Cart so what is that you have configured and why Nginx as I presume you are and not just Apache ? Did you configure your server by yourself or did you reach out to a specialist ?


running CS Cart V4.10.3.SP1 


 
  • abolshakov
  • Architect
  • CS-Cart Architects
  • Join Date: 20-Aug 14
  • 93 posts

Posted 02 February 2017 - 10:11 PM #8

...for static pages yes... not for php parsed results...


For everything: starting from static content like CSS/JS assets or images ending to high-concurrent proxying to FCGI.

Alexander Bolshakov
CS-Cart Architect Team


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11400 posts

Posted 02 February 2017 - 10:34 PM #9

Tony

 

You must have just more than 2 concurrent users on your CS Cart so what is that you have configured and why Nginx as I presume you are and not just Apache ? Did you configure your server by yourself or did you reach out to a specialist ?

My site has very low volume and I don't run Nginx.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 558 posts

Posted 02 February 2017 - 10:59 PM #10

For everything: starting from static content like CSS/JS assets or images ending to high-concurrent proxying to FCGI.

 

Can someone of CS-Cart team provide some benchmarks regarding the title of this topic? E.g. CS-Cart demo site running on Apache, Nginx and LAMP+Nginx to avoid frustration of customers, that their carts are slow because they don't have Nginx but don't know about things for example like overloaded VPSs?


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • abolshakov
  • Architect
  • CS-Cart Architects
  • Join Date: 20-Aug 14
  • 93 posts

Posted 02 February 2017 - 11:02 PM #11

Can someone of CS-Cart team provide some benchmarks regarding the title of this topic? E.g. CS-Cart demo site running on Apache, Nginx and LAMP+Nginx to avoid frustration of customers, that their carts are slow because they don't have Nginx but don't know about things for example like overloaded VPSs?


We use Nginx at the Highload Demo.

Take look at this:
http://forum.cs-cart...-products/?st=0

Alexander Bolshakov
CS-Cart Architect Team


 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 558 posts

Posted 03 February 2017 - 06:32 AM #12

Answering tbirnseth's question would be interesting http://forum.cs-cart...ts/#entry246637


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 
  • crazyshark20
  • Junior Member
  • Members
  • Join Date: 19-Aug 09
  • 304 posts

Posted 19 May 2019 - 10:51 AM #13

How can i install Nginx & Varnish & Apache in centos-webpanel
 
i found something but cant work

 

i use Let's Encrypt share ssl 

 

/etc/nginx/conf.d/vhosts/SİTENAME.com.ssl.conf file

#######################################################################
# CUSTOM NGINX CS-CART SETUP
# Replace DOMAINNAME with your domain name
#######################################################################

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/DOMAINNAME/before/*;

#######################################################################
# Description and configuration of the primary domain for the store.
#######################################################################

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    server_name DEVURL.COM DOMAINNAME.COM WWW.DOMAINNAME.COM;

    # FORGE SSL (DO NOT REMOVE!)
    # ssl_certificate;
    # ssl_certificate_key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!3DES';
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    #   Default encoding
    charset utf-8;

    #   Location of the log files
    access_log off;
    error_log  /var/log/nginx/DOMAINNAME-error.log error;

    #   Don't log common files
    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    # FORGE CONFIG (DO NOT REMOVE!)
    include forge-conf/DOMAINNAME/server/*;

    #   The main directory of your store
    root /home/forge/DOMAINNAME/public;

    # fastcgi_buffering off;
    # fastcgi_keep_conn on; # < solution
    # proxy_buffering off;

    #   Compression
    gzip on;
    gzip_disable "msie6";
    gzip_comp_level 6;
    gzip_min_length  1100;
    gzip_buffers 16 8k;
    gzip_proxied any;
    gzip_types text/plain application/xml
    application/javascript
    text/css
    text/js
    text/xml
    application/x-javascript
    text/javascript
    application/json
    application/xml+rss;

    #   Other settings
    client_max_body_size            100m;
    client_body_buffer_size         128k;
    client_header_timeout           3m;
    client_body_timeout             3m;
    send_timeout                    3m;
    client_header_buffer_size       1k;
    large_client_header_buffers     4 16k;

    #   The entry point of your store
    location / {
    
        #######################################################################
        # Restrict access during development.
        #######################################################################
        # auth_basic "Restricted";
        # auth_basic_user_file /var/www/.htpasswd;

        #   The main directory of your store
        root /home/forge/DOMAINNAME/public;

        #   The main script
        index  index.php index.html index.htm;

        #   For API
        rewrite ^/api/(.*)$ /api.php?_d=$1&ajax_custom=1&$args last;

        #   The script search logic uses the following order: file, directory, script
        try_files $uri $uri/ @fallback;
    }

    #   Rewrite rules for the SEO module
    location @fallback {
        rewrite  ^(.*)$ /index.php?$args last;
    }

    #  The first rule for searching static files.
    location ~* \.(jpeg|ico|jpg|gif|png|css|js|pdf|txt|tar|gz|wof|csv|zip|xml|yml) {
        access_log off;
        log_not_found off;
        # The rule for searching static files. If the server can’t find the file in the store folder, it will use the @statics rule.
        # For example, if your store is located at mynewshop.tk/shop/
        try_files $uri @statics;
        expires 14d;
        add_header Access-Control-Allow-Origin *;
        add_header Cache-Control public;
        root /home/forge/DOMAINNAME/public;
    }

    #   The rule for searching static files of the storefront. For example, when you have 2 storefronts in different directories: mynewshop.tk and mynewshop.tk/shop/
    location @statics {
        rewrite ^/(\w+)/(.*)$ /$2 break;
        access_log off;
        rewrite_log off;
        expires 14d;
        add_header Cache-Control public;
        add_header Access-Control-Allow-Origin *;
        root /home/forge/DOMAINNAME/public;
     }

    #   Processing PHP scripts
    location ~ \.php$ {
        root /var/www/public;
        add_header X-Frame-Options "SAMEORIGIN";
        proxy_read_timeout 61;
        fastcgi_read_timeout 61;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #   The path to the PHP-FPM daemon socket
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
#        fastcgi_buffering off;
        try_files $uri $uri/ =404;        
    }

#
#  Denying the ability to run PHP in the directories for security reasons.
#

    location /app/ {
      deny all;

      #  Allowing to run the script for 1C data exchange.
          location ^~ /app/addons/rus_exim_1c/exim_1c.php {
          allow all;
      }
    }

    #   Allowing to run the payment methods scripts.
    location /app/payments/ {
        allow all;
    }

    #   Forbidding PHP in the /design directory.
    location /design/ {
    allow all;
            location ~* \.([tT][pP][lL]|[pP][hH][pP].?)$ {
            deny all;
            }
    }

    #   Forbidding PHP in the /images directory.
    location /images/ {
        allow all;
        location ~* \.([pP][hH][pP].?)$ {
            deny all;
        }
    }

    #   Allowing static files only in the /var directory.
    location /var/ {
        deny all;
        location ~* \.(js|css|png|jpg|gz|xml|yml)$ {
            allow all;
            expires 1M;
            add_header Cache-Control public;
            add_header Access-Control-Allow-Origin *;
        }
    }

    #   Blocking outside access to the store’s database backups (/var/database)
    location /var/database/ {
        deny all;
    }

    #   Denying access to the template backups
    location /var/skins_repository/ {
        allow all;
        location ~* \.([tT][pP][lL]|[pP][hH][pP].?)$ {
            deny all;
        }
    }

    #   Processing API
    location ~* api/ {
        rewrite ^/api/(.*)$ /api.php?_d=$1&ajax_custom=1&$args last;
    }

    #  Denying access to .htaccess and .htpasswd
    location ~ /\.ht {
        deny  all;
    }
}

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/DOMAINNAME/after/*;


 
  • CartBooster
  • Senior Member
  • Members
  • Join Date: 25-Jun 06
  • 246 posts

Posted 27 May 2019 - 04:58 PM #14

We've ran 5,000 concurrent users, and have handled 20 orders per minute at peak with CS-CART. We run our server on NGINX. Database has always been the bottleneck for us. Converting it to innodb was a big help.


www.cartbooster.ie


 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 641 posts

Posted 27 May 2019 - 06:05 PM #15

CartBooster Can u share your mysql conf?

 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 549 posts

Posted 27 May 2019 - 07:33 PM #16

We've ran 5,000 concurrent users, and have handled 20 orders per minute at peak with CS-CART. We run our server on NGINX. Database has always been the bottleneck for us. Converting it to innodb was a big help.

 

InnoDB for sure helps with concurrency. Have you tried persistent DB connections as well?


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 641 posts

Posted 27 May 2019 - 07:47 PM #17

i know innodb rocks insert update queries , maybe some static tables must be myisam lang products tables , order user profile tables can be innodb for best performance

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 641 posts

Posted 27 May 2019 - 07:51 PM #18

And my last opinion is; time to upgrade cs-cart db engine to postgresql , i hope cs-cart team will do that early

 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 549 posts

Posted 28 May 2019 - 06:33 AM #19

And my last opinion is; time to upgrade cs-cart db engine to postgresql , i hope cs-cart team will do that early

 

You can install it yourself today by just using the pdo interface?


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • teosu
  • Senior Member
  • Members
  • Join Date: 09-Oct 14
  • 641 posts

Posted 28 May 2019 - 07:53 AM #20

i don't think so