XOR Media

Coding, Operations, Etc.

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.

UTC is the Only Real Timezone

If you're storing or transmitting time information in any way shape or form (web-services, databases, queues, NoSQL, caches, log files, or just plain txt files) the safest and thus best thing to do is to use UTC (Coordinated Universal Time) everywhere.

Yes you have to do math, but you ...

(more)
In ops, tagged: db, django, mysql, rails, time, and ubuntu.

Gunicorn, HTTPS, and Amazon Elastic Load Balancer

If you're looking to serve both HTTP and HTTPS out of EC2 from python, using gunicorn and ELB you'll need to add a bit of configuration to get gunicorn to correctly detect which scheme the original request was made with and thus allow Django (or whatever framework you ...

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