• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question apache HTTP 2

Seba

Basic Pleskian
Hi all,

I'm using Centos 7 with Plesk, is installing Ngnix the only way to have HTTP/2? Why I cannot have it just with Apache?

my Apache (httpd) version is 2.x
 
@Seba

You can run Apache with http/2, but that requires some additional steps to (essentially) get an endresult that is less effective than using Nginx with http/2.

In general, Apache is not very efficient (read: it is memory hungry and not very efficient when dealing with huge numbers of requests, which is the essence of http/2 protocol).

However, Nginx can easily serve and/or deal with 10K requests per second, even with an almost default configuration.

In short, using Nginx is a way to reduce the workloads on the Apache webserver ........... and that is always a good thing to do, that is a golden rule in hosting.

Hope the above helps a bit.

Regards.......
 
@trialotto

I understand I think that this requires a lot of reconfiguration from my part.

if I install Nginx every website will benefit from it without doing anything?
My problems will come when I need to reconfigure MapServer and MapCache to work with Nginx instead of a module of Apache in a live system...

I aware that the only way to speed up my App is to switch to HTTP/2, as you can need a lot of requests to MapServer/MapCache to get the map

Buchanan Computing Traffweb


Regards.
 
@Seba,

In general, the answer to the question

if I install Nginx every website will benefit from it without doing anything?

is "yes", but you should be aware that some tweaking might yield better results in terms of performance.

The statement

My problems will come when I need to reconfigure MapServer and MapCache to work with Nginx instead of a module of Apache in a live system...

is not entirely correct: MapCache can work with disk based cache or something like MemCached, so in theory it should be possible to intregrate with Nginx.

Nevertheless, it can be expected that Nginx's default (disk based) cache works better (even when deactivating MapCache, which deactivation should not be necessary though).

In summary, your (very) specific setup is associated with specific requirement that can be easily met when using Nginx.

Kind regards........
 
@trialotto

I'm using MapCache with an SQLite 3 database cache as I need to cache the whole UK and I'm running out of inodes if I use the disk cache, and then I use MapServer for lower levels to create the MasterMap on the fly as is customer area related so we don't have the whole Uk in that level.

If I need Nginx I will need to speak with my supervisor and see what we can do to implement HTTP/2.

Thanks :)

Kind Regards.
 
@Seba,

To be honest, using SQLite as a cache is not a good idea at all.

I really do understand the challenges in your setup, but these challenges never change the facts that

a) Apache + HTTP/2 is always worse when compared to Apache + Nginx (as proxy to Apache) + Nginx Cache (proxy cache),
b) SQLite as a key-value pair based cache is always worse when compared to Memcached or Redis (with Redis being the most performant and flexible)

and that actually implies that you have two (mutually exclusive) options:

1 - Apache + Redis, OR
2 - Apache + Nginx (as proxy to Apache) + Nginx Cache (proxy cache for certain requests) + MemCached/Redis (only for request on a specific level),

and option 2 is highly recommended and is to be preferred.

In essence, the second option is recommend and preferred due to the possibilities to

- allow Nginx to cache responses (from Apache server upon unique requests) to fast disk based cache for a (very) long period, AND
- allow MemCached/Redis to cache requests and responses (to and from Apache server) to very fast memory based cache for a relatively short period, AND
- allow Nginx to set and/or activate browser caching in order to have client side caching for unique sessions,

and that way, you will have the best setup imageable, with Nginx + MemCached/Redis (and browser caching) to offload Apache server and minimize server side problems.

Note that Redis based (memory) cache is recommended over MemCached, since Redis server is a bit more advanced and will allow for some overflow of cached data, with the overflow of cached data ending up as disk based cache automatically. MemCached is a basic caching mechanism that probably will not suit your needs.

Hope the above helps a bit........and if you want to, you can always send me a personal message via this forum.

Kind regards..............
 
Back
Top