Code

Outperforming MySQL by hand

There is this SQL table, right? This is the part where you knowingly nod and prepare yourself for a long story about how a database is as good as the person designing it. Let's call this table an access log. For the sake of argument, let's also say it's 30GB in size, has a 100 million rows, and only has an auto_increment PK ID field. Your task is, should you choose to accept it, to retrieve the last hour of entries in this log table.
Read more

So far there is a distinct lack of snakes

In the dashboard which I hacked together at MMC RTV Slovenia, I display a set of related flickr searches based on the current state of the system. So far, there's a distinct lack of snakes, volcanoes, lava, fire, explosions and other things that might freak an engineer out as much as a server outage. Thoughts: I like how the hosts are clearly marked when one of their metrics goes over a threshold.
Read more

Flickr API

I’m currently applying for a Flickr API key, and this is what I put into the description for “HQ Dashboard”: “I’m building a monitoring dashboard which includes statistics data from internal sources, some tweets and, hopefully, an assortment of Flickr backgrounds based on current monitoring conditions (ie., search for fire/destruction/storm/tornado when servers are being overloaded, and grass/meadows/happy/coffee if the monitoring says everything is fine). In this way I plan to use the Flickr search to provide a visual representation of the severity level currently being experienced.” Maybe I’ll add a Tumblr feed to the backgrounds too.
Read more

A venture in continous integration

Green lines are code deploys and red ones are requests going to a part of the cluster. I had a big deploy today, and I'm glad to come out of it relatively unscathed. Frameworks now use Composer packages, more code reuse now Updated structural framework, base classes Relatively smart and simple dependency injection Proper exception handling and notification Obviously there was some breakage. I had to fix about 5 incorrectly implemented interfaces, out of which one was affecting work (3 minutes to fix in production!).
Read more

API Backpressure

It's days like this where I love my job. I'm implementing back pressure for API calls that communicate to an external service. Depending on how overloaded the external service is, my API interface adapts to use caching more extensively, or to use a service friendly request retry strategy, minimizing impact on infrastructure and possibly even resolving problems when they occur. This is done by keeping track of a lot of data - timeouts, error responses, request duration, ratios between failed and successful requests,...
Read more