I started building out a blog today to give me a place to ramble about geek related things. As my role has transitioned much more technical this seemed like a good idea.
My role goes back to my roots as an engineer and lets me improve and maintain impressively large environments. Therefore this website couldn’t be simple, overkill was required.
Off to the Rackspace cloud we go.
- 1 DB server
- MariaDB for the wordpress backend
- Redis to do full page caching
- Private network and locked down iptables to make sure the server can’t be accessed outside of the environment.
- 1 UI server
- Nginx for performance
- PHP-FPM to handle the PHP code
- WordPress .. because I can.
- Access to the private network that Redis and the DB server are on.
- 1 Load Balancer
- While this wasn’t a needed piece to get started, it will make adding UI servers in the future easier
- 1 CloudFiles Container
- This will be where all the media in wordpress will be stored. Nothing will be stored server side for wordpress to help cut down on some security issues and to improve performance with the Rackspace CDN.
A few plugins were required to get this setup to work as I wanted it to.
Interestingly enough I only use this plugin for one purpose, to purge the redis cache when needed. While I thought I wanted this plugin for pretty links, it turns out that is not what it became useful for.
This plugin solved my no local media storage problem. Part of the design of this blog was to allow multiple UI nodes so local storage wasn’t an option. The plugin will upload the files straight to the CloudFiles container, use the custom CNAME for the container (cdn.andywiththebluehair.com) AND it will remove any copy of the file that may still end up local.
As part of my need for speed I wanted to remove as many of the queries against the database as possible. By using a 3rd party comments system, the database is no longer responsible for comments. Additionally Disqus does a great job handling spam and saves me the trouble.
This is more of a hack than it is a plugin. This is a drop in replacement to the index for wordpress. It will take a snapshot of the pages for the blog and store them in a key within Redis. When another user visits the same page the index will check redis for the key first, if it exists you will see the redis pre-built version and WordPress never gets called. For speed, this significantly beats out other caching systems.
Putting all the pieces together gives you this blog, and a place for me to talk about the things I’m doing, the tricks I learn and the day to day of my life.