1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

nginx + guest cache?

Discussion in 'Server Configuration and Hosting' started by Peace, Jan 8, 2016.

  1. Peace

    Peace Active Member

    I've seen cache plugins for Varnish and Litespeed Cache, but no luck finding an output caching equivalent for nginx.

    Basically, we sometimes receive huge viral spikes from forum posts being shared, and Litespeed Cache was a godsend because it allowed us to cache pages to guests (who accounted for most of the viral spike viewers), which gave MySQL a great break, which kept CPU/RAM stable.

    Is there any such tutorial or plugin for nginx? We'd like to switch, but every post I've found about fastcgi and output caching for nginx seems pretty quiet. Am I better off sticking with Litespeed for now?

  2. Sunka

    Sunka Well-Known Member

    Peace likes this.
  3. Mouth

    Mouth Well-Known Member

  4. Peace

    Peace Active Member

    Thank you both - I've checked out each and I don't think they do what varnish / lscache do, which is cache the entire output of a php page for guests, so no database queries or php processing are needed when loaded from cache
  5. Jeremy P

    Jeremy P Well-Known Member

    That's exactly what nginx caching does, it caches the results from the origin/upstream (php-fpm) and serves them when certain conditions are met.
    Peace likes this.
  6. Robust

    Robust Well-Known Member

    That is what nginx caching does, also, if you really want the hassle of maintaining Varnish, a common practice is/was to use it alongside nginx (until nginx was improved throughout its builds to the point where the differences aren't worth the hassle).
    Peace likes this.
  7. Nuno

    Nuno Active Member

  8. RoldanLT

    RoldanLT Well-Known Member

    I have this working on Nginx fastcgi_cache :).
    Credits to @eva2000 @hungphutho @MattW and @Floren for their guidance with I started digging it :D.

    I will post it soon here.
    Peace likes this.
  9. Nuno

    Nuno Active Member

    Would you share your nginx rules?
    Peace likes this.
  10. RoldanLT

    RoldanLT Well-Known Member

    Yes, I will post it here.
    I will create it as new thread.
    Peace and Nuno like this.
  11. Peace

    Peace Active Member

    Awesome, thank you!!!
  12. RoldanLT

    RoldanLT Well-Known Member

Share This Page