Justkez

Trying to be a consistent blog 
Filed under

server

 

Adding a little redis to Nginx

I have been doing some reading into key-value databases (schema-free/NOSQL), and am particularly taken with redis, which has had some limelight of late.

Many people have been advocating it as an alternative to memcached as a web-app caching system, so I thought I'd dip my toe in the ocean of caching with redis.

Note that I don't actually need to cache anything, it's just the performance angle appeals to me.

After moving from the standard apt-get install nginx to a from-source version of Nginx (compiled with the Nginx redis module, of course), I was able to do a few basic tests with ab (ApacheBench).

Using the following command:

ab -n 1000 -c 50 localhost/

I get some results:

  • Without redis caching: 2,864 requests per second (mean)
  • With redis caching: 3,354 requests per second (mean)

Conclusive?

Not really, just indicative. We all know Nginx is very accomplished at serving static files, and this was a very simple "Hello" index page, 15 bytes long.

However, this would certainly make me think hard about deploying redis alongside Nginx for any low-write/high-read web applications or sites.

The results aren't particularly astounding, but the simplicity of integrating redis with Nginx and the fact that it is so transparent should make any Nginx user think about going down this route.

Filed under  //   blog   nginx   performance   redis   server  

Comments [0]

Getting to grips with Jekyll

Justkez.com » A brief posting

Having recently heard about Jekyll from a Hacker News posting, I felt the urge of website change stir within me.

Justkez.com has been run through Wordpress for many years now (since 2006), but it has got to a point where I just wasn't comfortable with it - felt too clunky.

Why Jekyll?

Jekyll is a static site generator written in Ruby, with support for Markdown documents for blog posts. I have been writing postings in Markdown for the last year, so it seemed a logical move. With the working world taking over a lot of my time, I become less bothered about the latest plugins, or publishing widgets.

As such, a few of the old posts didn't make the cut, and some of the more popular ones have been polished up a bit; there shouldn't be too many lost links.

Speed boost

In a very rudimentary test, the previous Wordpress version could dish out 3.5 requests per second (ab -n 20), the statically generated Jekyll version is serving at 24 requests per second; something you would call statistically significant.

Living with Jekyll

As a result of the migrating...

  • Writing posts is much more straightforward, and I can punt the markdown files around on whichever computer is to hand

  • I have learned to --love-- use the Liquid templating engine; not quite my ideal, but it works

  • I am a lot more inclined to put postings together; everything just feels cleaner

So, if you're tempted by any of the above, give Jekyll a go.


Justkez.com is produced by Kester Dobson.
Feed icon There is an Atom feed available for syndication, and some archives to browse.

Filed under  //   blog   geekery   jekyll   ruby   server  

Comments [3]

Migrating Justkez to Linode

There has been some intermittent down time of the site over the last couple of weeks; apologies.

The first bout was moving from Slicehost over to Linode - something I toyed with some months ago, but was finally swayed by Eivind Uggedal's excellent comparison of VPS performance. Whilst I'm sure there are other performance metrics that would put Slicehost in the lead, there was more bang for less buck at Linode.

The second bout was migrating the baby-fresh Linode image to the recently announced London server, reducing average ping latency from 86ms to 4ms - nearly 12x faster.

Filed under  //   blog   geekery   server  

Comments [0]