(AKA the legally required ‘my WordPress blog went down after making Hacker News’ post-mortem post)
A few days ago one of my posts made the front page of both Hacker News and /r/technology. It was a bit of a surprise to me. But it was an even bigger surprise to my $5 Linode VPS, which quickly collapsed under the strain.
Thankfully I was home and blogging when it went down, so I noticed right away and quickly tried to diagnose why on earth PHP was using so much CPU. But the idea that it was due to a traffic influx never even crossed my mind. So I spent the first 30 minutes poking around and troubleshooting.
Eventually though, I thought to myself what if it was due to traffic? So off I went to my Cloudflare dashboard. And sure enough, traffic!
But of course once again my silly self struck again and I didn’t think for a single moment that it was genuine, organic, human visits on my read-by-a-dozen-people blog. Nope, in my head this of course had to be a DDoS attack – it was the only logically answer! So I turned on Cloudflare’s “I’m Under Attack” mode and left it at that.
As I sat there though, I pondered what if I was perhaps Fireballed or something? (And this all had to be just pondered because at this point I had no analytics on my blog. It was good for the privacy of my twelve readers. But not so good when I was trying to work out where a load of traffic was coming from). So, I went to
daringfireball.net. But nope, I hadn’t been linked to on there. Mmm.
I then rather pathetically typed my blog into Google News, seeing if that might shine any light. But nope.
Hacker News maybe? And… cook a cat! My latest post at the tippy top. Lots of actual humans on my blog! Panic mode engaged.
And also, how do I fix my downed blog?!
Well, it’s complicated by this blog
being used to being powered by WordPress. Self-hosted WordPress blogs have a long and storied tradition of going down after making Hacker News – a tradition my blog shamefully continued. In a world of increasingly static sites which survive any amount traffic, the LAMP based WordPress blog – which goes down as easily as Twitter in 2008 – does look a tad dinosauric and inefficient in comparison.
Thankfully in the end though, fixing the problem (at least temporarily) was actually fairly simple thanks to the fluidity of the cloud. I just threw horsepower at the problem and simply resized my server (Linode did this in just over two minutes, which I found rather impressive).
Well, it’s now a week or so on. And now that the dust has settled, here are some lessons and curious things I discovered after making the front page of /r/technology and Hacker News.
How much traffic does /r/technology and Hacker News send?
This is a little tough to know exactly as during the first hour of being on HN my blog was mostly down. But by the looks of it – and rather surprisingly – HN sent many more visitors than /r/technology, a subreddit with over 11 million readers (though to be fair, my post made the top of HN and only sixth on reddit). Here was the number of unique visitors on day one:
- Hacker News: circa 38,000+
- /r/technology: 19,771
The majority of traffic is phone traffic
I’m sure this comes as no surprise to people who often look at the analytics of their website. But as someone who has only done so for the first time it certainly came as a surprise to me that 69% of the visitors I got were on their phone.
Whenever I get the yearly itch to redesign the look of this blog I do of course always ensure it looks okay on a phone, but it’s an afterthought for the most part. My priority instead is how it looks on a desktop. But apparently I’ve got this backwards. Nowadays the focus should evidently be very much be on the smart phone, as it’s how the majority of visitors will experience the site.
Is Cloudflare worth it?
As the owner of a rarely visited blog, having my site run through Cloudflare felt like storing a pencil sharpener in a shipping container. So it was fun to see it actually be called into action and have proper traffic to deliver.
Cloudflare did let me down in some ways. Its “Always Online” feature didn’t save the day. It’s supposed to show a cached copy of my blog if the server goes down. But it apparently relies on the Internet Archive’s slow-to-crawl Wayback Machine for this (no hate, Internet Archive! You’re an amazing free service and one of the best corners of the web and I love you). And as the blog post that made Hacker News was only a day or so old there wasn’t a cached copy to serve. Which was a shame.
But when it came to caching and serving files Cloudflare did very well, with a 95% hit rate. Of the 107 GB of bandwidth sent out, my origin server handled just 4 GB of it. CloudFlare did the rest. And I’m sure they delivered it all far faster to the non-European visitors than my London-based Linode would have.
And the thing is, I titled this section ‘is Cloudflare worth it?’ But like most individuals, I’m not on the paid plan – just the free tier. So yes, Cloudflare is very much worth it. Aside from a few lock-in concerns and its tendency to present too many CAPTCHAs to genuine visitors, in my mind it continues to be almost a requirement for any website to be proxied through Cloudflare. It’s a remarkable service and tool.
What sort of server do you need for your WordPress blog to survive a Hacker News onslaught?
Do you run a self-hosted Wordpress blog and want it to stay up and running if you make Hacker News and /r/technology? Well, it looks like a $5/mo VPS isn’t going to be enough.
My blog was hosted on a VPS with 1 vCPU and 1 GB RAM when it went down. When things went south I upgraded to a $40/mo one with 4 vCPU and 8 GB RAM, which proved to be overkill – though I did want to guarantee no more downtime.
So how much compute do you need? Well I spent a lot of my time anxiously monitoring htop throughout all this. And from the looks of it the minimum requirement if you want to even stand a chance of your WordPress blog surviving a Hacker News beating is 2 vCPU with 2GB of RAM.
And this is presuming you have a WordPress caching plugin installed and CloudFlare handling the vast majority of static files. It also presumes you’re using Linode, who have pretty high-end CPUs (AMD EPYC 7601’s in my servers case). If you’re using an alternative with a less beefy CPU - like Digital Ocean or Vultr - you might need more than 2 vCPU to be safe.
You should also harden your WordPress site
It’s important to prepare your site for a potential influx of visitors. I know, I know, no one reads your blog. No one reads mine either. But for one day they did. And it was rather embarrassing when it immediately melted.
So be over prepared. If you self-host WordPress, you need to take it a little seriously, and some steps are likely required:
- Install a caching plugin. There are many. I use WP Super Cache. You don’t stand a chance without one.
- Use Cloudflare. It’s a very useful tool. It caches static content and speeds up your blog, as well as protecting you from bots.
- If your blog does go down, you’ll want to know. UptimeRobot can check every five minutes and email you if there are any problems - and all for free.
- Go overkill when it comes to hosting. I just presumed that because I wasn’t using some over-sold shared hosting service that my blog would be able to handle a sudden influx of traffic. But I was wrong. If I was just linked to by a fairly popular blog I might have been okay. But Hacker News and reddit is a different kettle of fish, and your site will likely go down if you end up being featured there. So sadly you’re just going to have to stump up the cash and pay the roughly $20/mo for a really good server if you want to self-host WordPress and survive a Hacker News-sized influx. That’s just the WordPress penalty I’m afraid.
With all that being said… bye-bye WordPress
After all this bother I’ve actually decided to do the cliche thing and say goodbye to WordPress and instead go the simple, static route. This blog is now powered by Hugo and hosted on Amazon S3. And thank goodness I no longer have to worry about MySQL databases, spammy plugins or wp-login.php attacks from Ukrainian hackers.
Finishing up. Overall it was really rather fun making Hacker News and /r/technology. And despite there being over 1,200 comments submitted across the two sites (apparently people like talking about their hatred for ads almost as much as they like talking about their hatred for Netflix subscription price increases), basically zero were mean to me – which was a nice surprise.
Also, hello to the new people who now follow the blog! Glad to have you here. Expect two posts a year :/
And one final note for older readers who subscribed via RSS: the RSS feed URL is no longer
https://imlefthanded.com/feed/. It is now
https://imlefthanded.com/index.xml. Apologies for the annoyance, but it’s probably best to update the URL for this blog in your feed reader of choice. Or you can get new updates via Twitter if you prefer. Thanks!
I’ve just spent the past hour writing a blog post about why on earth certain websites have autoplaying videos that must cost them a fortune in bandwidth. And then it dawned on me. Video ads!
I’ve been browsing the web with an adblocker for so long that I’d totally forgotten about the existence of ads being spliced into video content. Ah, silly me.
But just to be sure ads were the reason the website could afford to run video, I turned off my adblocker for the first time in years and visited the same page/video I was investigating. And yhep there they were. Lots of ads being regularly shown at intervals throughout the video.
Also, a side effect of turning off my adblocker to check for video ads was that I was presented by general internet ads for the first time in a long time. And god was it awful. There they were, flashing and taking up large parcels of screen real estate (along with I’m sure doing their usual tracking creepiness). What an unpleasant experience.
According to this article 27% of American internet users use an adblocker (which seems a little high to me). But either way, the 73% are experiencing a very different internet. And it’s a far, far worse one.
The internet these days has lost a lot of its charm, and I personally don’t find it quite as fun to browse as I once did. But I think without the help of an adblocker I would find it much worse.
As far as I’m concerned an adblocker is a requirement. Install one if you haven’t already.
Also, if you’re interested, below is the post I wrote before I remembered about the existence of video advertising (a happier time).
One of the many plagues of the internet these days is random autoplaying videos on websites. And the magazines owned by Condé Nast are especially guilty of this.
And I’ve always wondered why they’ve become a thing. Put to one side the annoyance to the visitor (thankfully the audio is usually on mute by default at least) and how much video streaming might cost users in countries with high data charges. But what about the cost to the website itself?
I would imagine margins are pretty thin these days if you run a magazine website. Advertising revenue isn’t what is used to be and the money they make for each visitor is probably the lowest it has ever been.
So with that being the case, surely they would want to deliver each and every page as cheaply and efficiently as possible to protect those small margins? So why are they autoplaying videos, which are famously expensive to deliver?
For example, lets imagine you read this article on Vanity Fair which Instapaper says takes 19 minutes to read. And the autoplaying video (they appear to be chosen at random) is this one which happens to be around 19 minutes long. All of a sudden a 5MB page has turned into a 261MB one. (Also, the Vanity Fair / Condé Nast video player isn’t very smart. Unless you make it fullscreen the video player size on the page is tiny. So it would make sense to deliver the video at 360p or a similar small resolution until the user makes the video full-screen, to save on bandwidth. But it doesn’t. As far as I can tell, despite the player being around 200 pixels wide, the video quality quickly climbs to 1080p.)
I’m sure Condé Nast is a large customer for their CDN of choice and are on a pretty cheap tier with a low cost per GB delivered. But even so, again: video is expensive! And I simply can’t see how it’s worth their while to autoplay video on their site. Can anyone explain this to me?!
A few anti-vaccine subreddits have popped up on Reddit over the past months. And in response, a selection of other subreddits are calling on Reddit to remove these subreddits - which are often full of misinformation - from the platform.
Well, Reddit CEO Steve Huffman (spez) has responded, essentially with ‘no’:
Dissent is a part of Reddit and the foundation of democracy.
He does on to say:
Reddit is a place for open and authentic discussion and debate.
(This was said in a post which has the comments turned off.)
Censorship is always a very tricky subject. By and large I am dead against it on the web. I want it be open and free. However, rampant lies and the purposeful spreading of misinformation about something so vital as the COVID-19 vaccine does come rather close to needing some stronger vetting by Reddit, in my opinion.
Either way, Huffman’s rather blunt and heavy-handed statement was probably not the best way for Reddit to announce its decision to allow anti - and most likely wrong - COVID-19 vaccine viewpoints and I expect an updated statement for ‘clarity’ in a day or two.
The $5 VPS is amazing. Sure, the specs you get for that five bucks has been stagnant for a few years now, with both Linode and DigitalOcean offering you 1 vCPU, 25 GB SSD and 1 TB of bandwidth. But it’s still a great deal.
I remember the dark days when I relied on ‘shared hosting’. With companies like A Small Orange offering just 500 MB of storage and 5 GB of bandwidth for $7/mo (and don’t worry that includes unlimited just one website). Or Dreamhost that offered unlimited everything for $3.95/mo! With 59.9999% uptime guaranteed!
A good VPS is the promised land in comparison. A little virtual box that you can do what you want with. And it’s surprisingly powerful. Each time I launch a new website I ponder whether it’s time to maybe spin up a new VPS for it. So I look at my Linode control panel and laugh at how little resources are being used. I mean I’m not exactly running video hosting services or anything like that. Just a dozen or so sites - mostly WordPress based - with a couple thousand hits a day. But I just find it hilarious that the CPU hovers at around 1.5%.
So here’s to you $5 VPS!
I realised something today. The world is riddled with complicated questions with even more complicated answers. And it can feel crippling at times. But when it comes to computers, phones, smart watches, smart headphones and tablets there’s a simple answer to the question of what to buy: Apple.
We’re living in the Apple era. The Apple brand is universal and unparalleled. Their output is by far the most innovative and beautiful. They’re so dominant that its rivals often seem laughable in comparison. And whilst in certain details they aren’t always the best, on the whole they are.
In fact I’m struggling to think of a single comparative company in history. All the ones that come to mind dominated through monopoly, isolation or acquirement of rivals, not through technical brilliance.
I’m no Apple cultist (half my blog posts feel like they’re moans about the minutiae of Apple’s latest ‘failings’) and I say all this not to gush. But I say it simply because it’s nice not to have to waste time and thought about the subject of what brand to buy. 9 times out of 10 - if I can afford it - Apple is the answer. So I’m free to spend my brain power elsewhere on unsolved issues like the perfect ratio of cheese to cracker.
If it’s too soon to know the meaning of the French Revolution, it’s too soon to know the meaning of Covid-19. But since we still greet sneezes with the 14th-century Black Death prayer ‘Bless you’, it’s possible a few new norms will emerge. Some predict the decline of business travel, others the demise of handshakes. It seems more likely that every household will, from this day hence, maintain a dusty supply of hand sanitiser, paper masks, and emergency loo-rolls. And maybe, just maybe, we’ll remember just how truly essential our essential workers are. #
Corbyn’s personality was always lacking. He wasn’t unlikeable, but was also not likeable either. And now he’s finally no longer leader of the Labour party. His slow, drawn-out political death has been completed. But Tom McTague in the Atlantic argues that Corbyn’s ideas will outlive the man himself, much in the same way Barry Goldwater did in the 1960’s on the American right with his brand of more radical conservatism ‘that would culminate in Ronald Reagan’s 1980 victory’:
Sanders and Corbyn fancied themselves to be the new Reagans (or Margaret Thatchers) in terms of the imprint they would leave on their countries, but were not up to the task. The question to haunt the conservative right is, what happens if these two historically peculiar leaders aren’t the Reagans of their movements, but the Goldwaters? And what happens if—or when—the left finally finds its Reagan?" #
[Corbyn has been replaced by Keir Starmer. Want to acquaint yourself with him? The Spectator has a good piece.]
A nice little explanation of why the internet was always going to be just fine during the COVID-19 crisis despite the massive spike in demand.
But the main takeaway from the article is that there could be 42 million Americans without broadband. And that’s not good enough:
Three weeks ago, everyone’s point of reference for high-speed broadband networks was the one-way delivery of video services such as Netflix. Henceforth, broadband will be recognized for what it is: a critical two-way connection that can no longer be considered a luxury. #
Good follow up read in BuzzFeed.News in the same vein of the Maciej Cegłowski article I linked to yesterday.
Is the coronavirus the kind of emergency that requires setting aside otherwise sacrosanct commitments to privacy and civil liberties? Or like the 9/11 attacks before it, does it mark a moment in which panicked Americans will accept new erosions on their freedoms, only to regret it when the immediate danger recedes?
Many countries have already taken creepy steps:
In South Korea, the government is mapping the movements of COVID-19 patients using data from mobile carriers, credit card companies, and the Institute of Public Health and Environment. In Israel, Prime Minister Benjamin Netanyahu ordered the country’s internal security agency to tap into a previously undisclosed cache of cellphone data to trace the movements of infected persons in that country and in the West Bank. And in the Indian state of Karnataka, the government is requiring people in lockdown to send it selfies every hour to prove they are staying home.
But the real question is less about what elements of digital privacy we as a society are willing to trade in right now to help stop the spread of COVID-19 and more about wether we’ll ever get them back.
The article ends with this:
Sanchez worried that the coronavirus, like the war on terror, is an open-ended threat with no clear end — inviting opportunities for those surveillance measures to be abused long after the threat has passed. In the same week that he spoke, the US Senate voted to extend until June the FBI’s expanded powers under the Foreign Intelligence Surveillance Act, originally passed in the wake of the 9/11 terrorist attacks 19 years ago.
I think it’s safe to presume that anything we lose will never be returned.
[DJI CEO, Frank Wang] is perhaps the most private tech CEO of them all, shunning all but a handful of media requests over his 14 years as DJI’s boss and figurehead. He stoodup a planned interview for this story twice, leaving his representatives to apologize and explain that they just never quite know what the man will do. In fact, the rumor going around DJI’s press office is that Wang might not speak to a reporter ever again. […] Wang once threatened to dock the pay of a public-relations executive because Wang had received too much attention in the media. […] DJI’s hiring standards are famously strict… Those who seem engineering-focused enough eventually face a hands-on challenge: soldering drone components together. Until recently, even potential sales and marketing hires were asked to complete this task. The tests don’t stop once an employee is hired. DJI has become infamous for its competitive atmosphere. The company separates workers into groups and challenges them to come up with rival takes on a new product. The winning group gets the glory of seeing its ideas come to market; the losers must help make that happen. Employees are often asked to judge one another in surveys and to rate the performance of other departments. This data is then used to help decide salaries. #
The article ends a little abruptly, but it’s still worth your time.
At the gathering, held at the International Telecommunications Union, a UN agency that establishes common global standards for technologies, they presented a simple PowerPoint. It didn’t bother with much detail on how this new network would work, or what specific problem it was solving. Instead, it was peppered with images of futuristic technologies, from life-size holograms to self-driving cars. The idea was to illustrate that the current internet is a relic that has reached the limits of its technical prowess. It was time, Huawei proposed, for a new global network with a top-down design, and the Chinese should be the ones to build it. #
This is scary:
China is already in the process of building a credit-scoring system for its population, based on online and offline behaviour and past “misdemeanours”, the delegation member noted. “So if somebody’s social credit score dipped below a certain amount because they were posting on social media too much, you could actually prevent that phone from connecting to the network.”
Note: the Finanical Times' paywall and website is awful. They even inject this when you copy and paste something:
Please use the sharing tools found via the share button at the top or side of articles. Copying articles to share with others is a breach of FT.com T&Cs and Copyright Policy. Email email@example.com to buy additional rights. Subscribers may share up to 10 or 20 articles per month using the gift article service. More information can be found at https://www.ft.com/tour.
So I’ve linked to a cached copy of the article. But if want you can read it at its original URL here.
Today I stumbled on the website for a blogging engine called Blot that I’d never heard of before. The general design of the site and the fact that it ‘turns a folder into a blog’ made me think it was probably created by some dude about five years ago and is now probably long abandoned.
But while it turns out that it is about five years old and is also made by just some dude it most certainly isn’t abandoned. Because after some more poking I found a really cool ‘news’ page. Essentially it’s a mirror of the developers to do list along with their recently completed tasks. It’s a simple but wonderful idea and does a great job of quietly broadcasting the hard work of the developer and signals to users that the service is still very much in development. I wish more services and software did something similar. And Blot itself looks cool. Check it out.
- the recreational drug market? Will cross border drug movement increase and how will production change?
- dog ownership? Now is a good time to have a dog. From both the human and canine perspectives.
- people with mental health issues? Being stuck indoors is going to massively alter even the mostly mentally strong.
- climate change? Will the world start to focus on it more?
- travel post-virus? Will there be a boom as people take on a carpe diem attitude in the years following coronavirus?
- the number of children born? Couples don’t have a lot else to do.
- long term success of school children? Will being essentially home schooled be good or bad for the education and development for this current crop of children?
- advancement of technology? Will this be the final nail in the coffin of Moore’s law?
- music, writing and other creative outputs? How much will free time increase them?
- gym-based exercise? Will outdoor activities like running and cycling experience more than just a short term uptake as some people discover their joys and benefits for the first time?
- the number of people who start ‘prepping’ and off grid living? At the very least I expect the average homes pantry and freezer size to increase post-virus.
- conflict around the world? Will more than just a brief pause happen? Will many essentially fizzle out? Or will tensions actually increase?
- society as a whole when so many elderly are likely to die? What will we lose?
- future preparedness? Will this be treated as a dress rehearsal for potentially more devestating pandemics in the future or will it be treated as more of a final test unlikely to happen again this century?
- minimum wage? Will ‘unskilled’ labour be more highly valued and appreciated going forward?
- journalism? Will their perceived value in society increase due to the large coronavirus-based output and more people reading their (digital only) work?
- air travel? Is this the end of budget airlines? Will airports and airlines be nationalised?
- the quality of roads? Will governments take advantage of the lack of cars on the road and rebuild and update major motorways?
- alchohol consumption? And how many new alcoholics will be created by citizens having no work, more anxiety and little else to do? As well as the chance for nightly drinking to become a habit.
- dating and sex? Are new relationships totally on hold, or will pen-pal and video dating take over? Will single people desperate for sex help spread coronavirus? Will goverments ban one-night stands?
- sleep patterns? With less work to wake up for will people become more in tune with their natural circadian rhythm?
- the price of oil? How low will the per-barrel cost go?
- divorces? Will they increase by as much as I expect?
- will siblings grow closer or further apart?
- traditional broadcast television? Will every channel just air reruns as they can no longer make new programming?
- christmas? How many less presents will be under the tree at the end of 2020?
- endangered animals? Will their numbers start to recover? Or as those who protect them disappear into their homes will poachers risk coronavirus infection for financial reward?
- the restaurant industry? How many can actually wait out the financial storm?
- sport? Will this just be a year unrecorded in sports history?
- doctors and nurses long term? With so many potentially dying will there be a massive shortage over the next decade?
- food consumption? Will it force the move to less intensive farming? How will vegans and meat eaters be effected differently?
- the price of chickens? If eggs are hard to come by in supermarkets will people start selling their back garden chickens for thousands of pounds?
- the flu long-term? Will peoples potentially better hygiene habits stop the flu being as dangerous as it once was?
- remote working? Will it bring about a great change to the average office workplace?
- the ability for women to get abortions?
- air quality? Will the lack of cars make a massive long term difference?
- gardens? With so much time on their hands will people decend upon their gardens for fresh air and start to pamper them into beautiful oblivion? Or will they become essential food growing areas and become like allotments?
- drone deliveries? Will it finally become more than just a publicity stunt and actually be a viable delivery option?
- domestic abuse? Many sufferers are now stuck in their homes with their abusers with no where to go.
- economies world wide? Are we entering a decade long depression? How can poorer countries survive when they can’t borrow from other wealthier countries who have taken on massive debts themselves?
- civil unrest? Will the national lockdowns go on so long that one day the public will have enough, spill onto the streets, and riot?
I have a lot of questions. But sadly not a lot of answers. We will just have to wait and see…
“Almost everybody who is hospitalized has this same story,” said Dr. Marco Metra, chief of the cardiology department at the main hospital in Brescia, where 700 of 1,200 inpatients have the coronavirus. “You ask about the patient’s wife or husband. And the patient says, ‘My wife has just lost her smell and taste but otherwise she is well.’ So she is likely infected, and she is spreading it with a very mild form.” […] Hendrik Streeck, a German virologist from the University of Bonn who went from house to house in the country’s Heinsberg district to interview coronavirus patients, has said in interviews that at least two-thirds of the more than 100 he talked to with mild disease reported experiencing loss of smell and taste lasting several days. #
A UK Health Minister Nadine Dorries who had COVID-19 tweeted about not being able to smell or taste too.
I’m currently reading The Splendid and the Vile: A Saga of Churchill, Family, and Defiance During the Blitz by Erik Larson. It’s great (I might post some more extracts in the coming days) and it feels like a particularly appropriate read during the ongoing coronavirus crisis as the book focuses a lot on the the day-to-day realities of the Blitz, which all too often are starting to vaguely resemble what people are currently going through today. Example in point, toilet paper shortages:
Many other products, while not rationed, were nonetheless in short supply. A visiting American found that he could buy chocolate cake and a lemon meringue pie at Selfridges, but cocoa was impossible to find. Shortages made some realms of hygiene more problematic. Women found tampons increasingly difficult to acquire. At least one brand of toilet paper was also in perilously short supply, as the king himself discovered. He managed to sidestep this particular scarcity by arranging shipments direct from the British embassy in Washington, D.C. With kingly discretion, he wrote to his ambassador, “We are getting short of a certain type of paper which is made in America and is unprocurable here. A packet or two of 500 sheets at intervals would be most acceptable. You will understand this and its name begins with B!!!” The paper in question was identified by historian Andrew Roberts as Bromo soft lavatory paper.