The final stage in speeding up my blog was to add some serious caching to the front of it. This may even have been overkill, because it was already pretty swift under nginx/php-fpm, but cutting out the database connections would speed it up even more.
I had a quick go with the W3 Total Cache WordPress plug-in, but it seems rather biased to running Apache (which I’m not) and I experienced some strange errors that I failed to immediately fix. Rather than wrestle with it, or try other WordPress caches, I decided to get to grips with Varnish. This is something I’d been meaning to do for ages, and of course it isn’t limited to WordPress – Varnish is a fabulous caching solution for whatever site you’re building.
Read more…
As part of my “speeding up my blog” series, I planned to write a nice, informative post about upgrading to WordPress 3, deploying your theme to a CDN, and getting it all running under nginx. Unfortunately WordPress irritated me so much in the process, that this has turned into more of rant. Sorry in advance.
I have a like/hate relationship with WordPress. That is to say that it does a lot, it has a great admin area and there’s a large community producing themes and plug-ins. However, I am a PHP developer of many years, and every time I come into direct contact with the core WordPress code-base I end up being sick in my mouth.
Read more…
«« See previous post for getting nginx up and running. This post is about getting PHP running as a FastCGI.
Speeding up my blog
Performance issues aren’t just for high traffic sites. I’m lucky if I get 50 visitors a day to this site, but by using scaling techniques popular with the big boys, I figured I could increase page load speeds, (good for visitors and good for SEO). If I could achieve this and use less resources, perhaps I could even save some money on my hosting bills. I currently run a 512MB VPS on Slicehost, and I’d rather not increase this right now.
With a few days off work, I decided to take the plunge and swap out some of the server tech powering this blog. From the bottom up, so to speak, this was as follows -
- Replace Apache with Nginx (below)
- Upgrade to PHP 5.3.3 and run as a FastCGI (next post)
- Upgrade to WordPress 3
- Deploy a CDN
- Add a Varnish cache for extra speed
I’ll go through my experience across a number of posts, starting with Nginx. I shan’t replicate any existing documentation; I’m just going to go through what I did and point you at the resources you’ll need.
Read more…
Another Twitter app launched itself to momentary viral stardom this morning by using a practice that seems to irritate more-or-less everyone. I refer to the mandatory auto-tweet posted from your own account saying something like “I just scored X% using suchandsuch app” – you know the type. This particular app was the sneaky, (or misguided) type that gives no warning, and no way of opting out.
Anyhow, this isn’t the first time I’ve been annoyed by auto-tweeting, I’ve written about it before. It’s happened more times than I care to remember, so I won’t go into the details of today’s particular example, except to say that its author has [sort of] apologised. It’s already been blogged anyway if you’re curious.
What I will harp on about though, is the fact that this is nothing short of spam – Twitter needs to agree, and needs to make it easier to report badly behaved apps. Read more…
My much neglected personal project JASPA has been taken offline. All traffic to jaspa.org.uk is redirecting here for now.
Read more…
I use this really basic Firefox bookmarklet pretty much every day, so I thought I’d post it.
–> Dictionary.com <– drag to toolbar
Dictionary.com provide an ‘official’ bookmarklet, here:
http://dictionary.reference.com/tools/bookmarklets.html
I’ve improved it a bit Read more…
AMF and RTMP libraries for node.js – Flash remoting with node.
I’ve been having fun playing with node.js over the past year, but have had little, or no excuse to use it in any production work, so I thought I’d set myself a challenge and build a module. That challenge was firstly to create a simple AMF gateway for Flash remoting, and secondarily to see if an RTMP socket server was achievable in node.
If you don’t know about “node” – It’s a JavaScript runtime that allows you to write socket servers. I like it a lot – it brings asynchronous, event-driven programming to the server side and provides a truly global variable scope across all connections. I’ll blog about it in more detail later, perhaps.
At Public we do a lot of Flash work, and regularly implement Flash remoting using a PHP AMF gateway. I wasn’t necessarily looking to replace this stock approach with node, but node offers proper socket connections that PHP can’t, so I was imagining the possibilities of using node as a free, and more flexible alternative to Flash Media Server. Not for streaming media, but for real-time messaging, for example in multi-player games. If I’m honest though, I did this mostly for fun, an academic exercise and as an excuse to work with node.
The four NYU students pledging to build Diaspora captured my imagination today, and I’m not the only one.
There is so much to discuss around this and it’s not even out of the lab yet. In a rare display of focus, I’ll devote my first post on the topic to one of the more obvious questions – Can they (or do they need to) get 400 million people to migrate away from Facebook? Read more…
Off the back of all the recent Facebook changes I just read the OAuth 2.0 spec – it’s currently in a draft state, and according to this page, Facebook is currently the only implementation in the wild. This new spec attempts to pull together various authentication journeys rather than just the typical web app model. This is a great news – It seems to accommodate many different situations across differing devices with different capabilities, while maintaining a good level of consistency.
You didn’t expect me to have only nice things to say, did you? There are a couple of things I have to question. Read more…