Live data from Hacker News

Wordpress.com serves 70k requests/second using Nginx

highscalability.com

91–97 of 97 posts

Re: Wordpress.com serves 70k requests/second using Nginx

#91
post #77

Earlier quoted context omitted.

Edit: actually, it looks like this doesn't work the way I think it does ... looks like nginx has changed enough between 0.7 and 1.0 that my original config doesn't work as correctly as it used to. Edit 2: Actually I think WP Supercache is the one that changed. Edit 3: This config looks more up-to-date than mine -- http://rtcamp.com/tutorials/nginx-wordpressmultisite-subdoma... I particularly liked how they used the t…

Googling is about the worst way to set up an nginx server configuration! The only tutorials and helpful snippets out there are riddled with bad practices. Here's a list of "pitfalls" that are commonly used and really shouldn't: http://wiki.nginx.org/Pitfalls I notice that you're using a lot of "if" statements. I hope you've read this http://wiki.nginx.org/IfIsEvil . I understand that in this case it might be harder t…

It's been a few years since I cobbled this one together and I recall reading the IfIsEvil web page. I vaguely recall that at the time there was some limitation on how try_files worked that made it necessary to use ifs, but for the life of me I don't remember what.

The rtCamp configuration I linked to earlier makes use of try_files and says he has support for both supercache and domain mapping, so I think I'll migrate to that.

Re: Wordpress.com serves 70k requests/second using Nginx

#92
post #49

Earlier quoted context omitted.

APC+mysql cache (not just query but keycache too) is a must, but memcached is pointless unless you have a multi-server website (on a single server APC shared memory is way faster than memcached). All logged out users should be served a completely cached static page that bypasses PHP entirely, it's way faster than even an opcode cache and way less load. WP-Super-Cache can serve static pages to logged out users and mak…

I don't know how the caching plugin in WP works, however the most difficult part of caching is always cache invalidation, which is the reason why Memcache is better than an in-memory cache, even for a single server, because then you have the flexibility of invalidating cache entries from a background process that does not run on that server. It's also great to have the flexibility of adding more servers in case of a…

If you want a smart cache invalidation system for NGINX please have a look at this plugin http://bit.ly/nginxmanager

Pages are cached on NGINX for not logged in user, and when a new content is published all and only the pages that contains that content are deleted from the cached and regenerated at the next request.

Re: Wordpress.com serves 70k requests/second using Nginx

#93
post #71

Earlier quoted context omitted.

Isn't there a known fix for this for like a year or so? ( http://www.justincarmony.com/blog/2011/01/24/php-nginx-and-o... )

It is only a 1k chunk. This sucks for chat-type applications ( Also, in that example, you can't use gzip. If I use a nginx+apache setup, I can do output flushing and gzip. I hope nginx fixes this issue. *This affects php/fcgi.

Nice to know! Thanks for clarifying.

Re: Wordpress.com serves 70k requests/second using Nginx

#94
post #64

We dropped nginx because of no native support for session affinity. SSL support has been introduced in HAProxy very recently.

Is the ip_hash directive not good enough for what your looking for?

I was not aware of ip_hash. But as per documentation it uses first 3 octets as hashing key, this may not work for me.I want to use nginx on LAN. It will throw all clients to same backend server.

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#...

Re: Wordpress.com serves 70k requests/second using Nginx

#95
post #94

Earlier quoted context omitted.

Is the ip_hash directive not good enough for what your looking for?

I was not aware of ip_hash. But as per documentation it uses first 3 octets as hashing key, this may not work for me.I want to use nginx on LAN. It will throw all clients to same backend server. http://nginx.org/en/docs/http/ngx_http_upstream_module.html#...

It should be fairly trivial to patch your copy of nginx to use the entire IP address as the hashing key.
Post reply on HN