4 ms·
I have a bog-standard WordPress, on a shared host, and it doesn't suffer from the HN "hug of death". I don't use CloudFlare or any other CDN. The secret? I hav
by edent 6y ago
I have a bog-standard WordPress, on a shared host, and it doesn't suffer from the HN "hug of death". I don't use CloudFlare or any other CDN.
The secret? I have a lightweight theme with minimal dynamic content, and I use LiteSpeed cache on the server. That's it. Easily handled 20-40 thousand pageviews over a couple of hours.
- fidrelity 6y agoTotally blows my mind as well. This post[0] was #1 on the front page for a day and I had 0 issues serving requests running on the cheapest shared Wordpress hosting with the LiteSpeed Cache plugin enabled. [0] https://andreschweighofer.com/agile/anxiety-in-product-development/ https://andreschweighofer.com/agile/anxiety-in-product-devel...
- eznzt 6y agoAutomattic (the company that develops WordPress) offers a free plugin which, when correctly configured (requires some cooperation from the web server), serves completely static pages for all posts. No PHP code is executed. https://wordpress.org/plugins/wp-super-cache/ https://wordpress.org/plugins/wp-super-cache/
- CobsterLock 6y agoI was thinking that 100 requests per minute doesnt sound like a hug of death. The article does touch on reducing the amount of dynamic content, which reduces the number of data What makes MySQL so bad at handling queries? I have never worked with it personally, but it seems like a core feature of a database should be handling many concurrent requests
- falcolas 6y agoMySQL (and PostgreSQL, for that matter) isn't bad at handling queries, when the tables are tuned for those queries. People don't do this well (if at all), and few databases are capable of automatically tuning tables (creating indices), since they require resources, and can have tradeoffs between read and write performance. Properly tuned, a database is able to handle millions of requests per second.
- mschuster91 6y ago> What makes MySQL so bad at handling queries? I have never worked with it personally, but it seems like a core feature of a database should be handling many concurrent requests The software that is used to generate the queries. Inadequate indices, writes on each page load that lock shared tables...
- jamesponddotco 6y agoAs someone who has worked on WordPress hosting companies for over 10 years now, I feel obligated to add that many hosting companies do not optimize MySQL settings either, despite their marketing saying otherwise. In fact, the database layer is often forgotten when you talk optimization in the WordPress world — page cache is usually seemed as the holy grail, with MySQL left to fend for itself.
- smt88 6y agoIn defense of anyone managing WordPress, its database schema is not well-normalized or organized (last I checked, it still had something like 6 tables). That scenario (in general, not referring specifically to WP anymore) makes database indexing/optimization much more expensive at webhost scale, because you potentially have columns that range in size from empty to 1MB. That's why most WP users have gone deep down the rabbithole of view-level caching, because optimizing an uncached result is so much harder in that environment.
- jamesponddotco 6y agoOh, I agree, optimizing MySQL for WordPress is a constant battle, with plugins and themes not handling the uninstallation process at all, and leaving huge amounts of data inside the wp_options table with autoload = on, for example, or the expensive queries that WordPress itself make — Elasticsearch and object caching are big help on this one in particular. But if you call yourself a managed WordPress hosting company and your marketing material says your entire stack is optimized for WordPress, you should be held to higher standards than a shared hosting company like HostGator, for example.
- 6y ago
- jcadam 6y agoI also have happened upon an innovative solution to avoid the HN hug of death: Nobody reads my blog.
- sarosh 6y agoI wish to subscribe to your newsletter.
- MikusR 6y agoMy method of not having a blog is even better.
- deleted 6y ago[deleted]
- AndrewStephens 6y agoI endorse this solution as well and proactively work towards it by only publishing boring and obscure content. It has many benefits: * blazingly fast for readers with no chance of slowdown * very low hosting costs * linkfarmers never steal my content * I don't have to moderate comments I recommend this approach to everyone.
- wonder_er 6y agoYou've failed, unfortunately. Your "boring" content is actually quite interesting. Oh well, everything else is true: Blazingly fast, low hosting costs, no comment moderation, etc. >_<
- Jaruzel 6y agoI've been on the front page of HN a few times, and my site has never gone down due to the hug of death. My setup is a simple low spec VM running under Microsoft Hyper-V on an aging twin Xeon tower server. My site is Apache+PHP on Debian with no SQL backend; the PHP uses templates and flat files. Rock solid, and can really take a hammering. I'm starting to think that it's time for people to stop using WordPress+MySQL and move over to something more performant.
- ls65536 6y agoI also run a project with Apache+PHP on Debian, with SQLite and a standalone C program that it interacts with running on the same machine. The whole setup runs on a single, low-spec VPS, and it too easily withstood the HN front page a few months ago [0], with plenty of capacity to spare. I've found it amazing how much you can do these days with even a cheap VPS, and how many requests you can serve as long as you're disciplined about not going overboard with excessive dynamic content and knowing where your scalability pain points are (sometimes this isn't obvious until you really get a lot of traffic!). [0] https://news.ycombinator.com/item?id=23661326 https://news.ycombinator.com/item?id=23661326