XOR Media

Coding, Operations, Etc.

High Performance Web: Reducing Database Round Trips

Background

There are two main sources of latency in the backend of web applications: rendering (HTML templating or data serialization) and IO (database or external service calls.) Today we'll look at the latter and more specifically focus getting rid of extraneous database round trips. The fastest query possible is ...

(more)
In code, tagged: db, examples, performance, and sql.

Efficiently Querying for Nearby Things

It's a fairly common use case to have a latitude and longitude and want to find the closest objects to a given point. While there are heavyweight solutions: MySQL Spatial Extensions, PostGIS, they can be more trouble than they're worth especially if you're making use of an ...

(more)
In code, tagged: algorithms, db, examples, geo, mysql, performance, and sql.

Keeping Track with Graphite and Statsd

I recently gave a presentation on graphite and statsd to the East Bay Django meetup It's more about the importance of stats in general when running services, web or otherwise. The slides are available and embedded here. There's also a related demo project that turned out to be ...

(more)
In ops, tagged: django, performance, python, and stats.

Django ALLOWED_HOSTS and Amazon Elastic Load Balancer

A recent Django security release added a new configuration option, ALLOWED_HOSTS. It's optional in 1.3 and 1.4, but required in 1.5 setups. The relevant detail is that when enabled in production Django will throw 500 errors if the Host header doesn't match one of the ...

(more)
In ops, tagged: aws, django, elb, and python.

Top 5 Percent

LinkedIn does a pretty good job of email communication. I probably read 50% of the emails they send me and I've remained subscribed to them for quite a while now.

A few minutes ago I received one of the best emails they've sent me yet, subject:

"Ross, congratulations ...
(more)
In misc, tagged: resume, and linkedin.