Jump to content

Nginx caching?


Linda A

Recommended Posts

Up until recently, we used Varnish to cache the forum for guest users. We've shifted to a new server that's quite powerful and are now running Nginx and thought that instead of Varnish perhaps we could use Nginx's caching to save a step. We already have it set up for caching static content, but are there any guides available for setting it up to cache dynamic content and how to make sure those who are logged in can get the dynamic content directly rather than through the cache?

Link to comment
Share on other sites

4 minutes ago, Rhett said:

What issue are you referring to?  if it's the html purifier, that was fixed in the first beta of 4.2, if not please clarify? 

Yes that is the one, the last I heard it was to be fixed in 4.2, but just wondering if it was fixed in the beta versions.

Quote

An issue has been identified with PHP 7.1 when using the Zend OPcache extension that may cause features on your site, such as member posting, not to work correctly. If you are experiencing problems posting, please disable the Zend OPcache PHP extension. The underlying issue is related to a third party library used by the Community Suite which has been updated in our upcoming 4.2 release, at which point the OPcache extension may be re-enabled.

 

Link to comment
Share on other sites

1 minute ago, nodle said:

Yes that is the one, the last I heard it was to be fixed in 4.2, but just wondering if it was fixed in the beta versions.

 

Yes that was fixed with an updated html purifier version, in the first 4.2 version. It only affected a very small handful of people as well, it was not affecting everyone with php 7.1 though. 

Link to comment
Share on other sites

3 minutes ago, Rhett said:

Yes that was fixed with an updated html purifier version, in the first 4.2 version. It only affected a very small handful of people as well, it was not affecting everyone with php 7.1 though. 

I think I tried it in beta 5 and still had problems, should I try it again with beta 5a?

Link to comment
Share on other sites

14 minutes ago, Rhett said:

You shouldn't have any issues, if you do, ensure you are on the latest and please submit a ticket. 

I submitted a ticket @Rhett. I just tried it, same thing as originally, maxed cpu to 100%, members can no longer post. Ticket #983420

Link to comment
Share on other sites

14 minutes ago, Linda A said:

@Rhett,

 

Thanks. Just to clarify, guest caching only works with opcaches? Does Redis not work for that sort of caching?

It works without anything at all, a server side opcache then enhances this by caching php. So a guest will not touch the database (ips) and your php files will be cached via the server side opcache. 

Link to comment
Share on other sites

@stuart

Thanks. So... have Zend OpCache enabled, have Redis, the ideal setup is then MySQL DB for data storage, Redis for Caching method, and whatever amount of time feels reasonable for caching pages for guests.

Apologies if I seem a bit lost on this. I'm just not following how these different caching systems interact (if they do at all).

 

 

Link to comment
Share on other sites

2 minutes ago, Linda A said:

@stuart

Thanks. So... have Zend OpCache enabled, have Redis, the ideal setup is then MySQL DB for data storage, Redis for Caching method, and whatever amount of time feels reasonable for caching pages for guests.

Apologies if I seem a bit lost on this. I'm just not following how these different caching systems interact (if they do at all).

 

 

Yes, that would work well. When using Opcache I would still recommend using the filesystem for the data storage method  (unless your setup requires it to be set as MySQL). This will instead utilize the Opcache and attempt to avoid making a connection to the MySQL server (which is more efficient)

Link to comment
Share on other sites

Got it. Just a thought, but might it be considered to provide some more clarification regarding file system vs. DB caching on the setup page? Right now it just says that MySQL is generally superior... but it sounds like using File Caching is best if you have an op cache in place.

 

Just to add, I found the help documentation below and it really just doesn't explain what difference there is between Data Storage Method and Caching Method. Do these interact at all? If so, how? If I'm using the file storage system, does Redis even do anything for the forum? And vice versa, if I'm using the DB storage system, does Zend OpCache really do much?

 

Link to comment
Share on other sites

1 hour ago, Linda A said:

Got it. Just a thought, but might it be considered to provide some more clarification regarding file system vs. DB caching on the setup page? Right now it just says that MySQL is generally superior... but it sounds like using File Caching is best if you have an op cache in place.

 

Just to add, I found the help documentation below and it really just doesn't explain what difference there is between Data Storage Method and Caching Method. Do these interact at all? If so, how? If I'm using the file storage system, does Redis even do anything for the forum? And vice versa, if I'm using the DB storage system, does Zend OpCache really do much?

 

 

There is no one solution for everyone, every site will be different, based on size, activity, hosting setup and resources, traffic, third party items and on and one.  It's best to speak with your systems administrator and review your setup and needs in your specific case.  In fact many reading this or trying to mess with caches and such, don't have the size or traffic to even be worrying about it. You do in your case, and should see some great results for a proper setup. 

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...