projects | pushover | github | twitter | rss | contact
July 2017

Pushing DNS into the Cloud

posted to writings on jul 10th, 2017 with tags pushover and rails, last updated on jul 7th, 2017

For the majority of the past five years, Pushover has run on one physical OpenBSD server. It does have a hot spare hosted with another company in another part of the country, but usually everything has been served from just one machine at a time. Its MariaDB database is replicated in a master-master configuration over a secure tunnel between the servers so that either node can become active at any time.

Continue reading 2,310 words...

February 2009

static files with apache 2 + mod_proxy + mod_rewrite + mongrel + rails

posted to writings on feb 22nd, 2009 with tags apache, openbsd, rails, and ruby

corduroy does everything over ssl and because of that, it was noticeably slow on my openbsd laptop with firefox 3. using tamper data, i was able to observe that firefox was not caching any of the stylesheets or javascript files, so on every page load it would have to re-fetch these few files (one of them being prototype at a hefty 28kb post-gzip). that ultimately seemed to be a quirk in firefox on openbsd since the same setup with the same version of firefox on my mac was caching them fine and safari was as well.

with the help of rails' stylesheet_link_tag et al. appending urls with "?1214348293", i was able to use apache's ExpiresActive to force very long expiration times on these static assets:

Continue reading 626 words...

December 2008

god god

posted to writings on dec 7th, 2008 with tags openbsd, rails, and ruby

i'm using god on openbsd (kqueue) to monitor a dozen mongrel processes for various rails sites on one of my servers. i started using it just to have a simple way of restarting each collection of processes when i need to load new code or just start them when the machine boots up. eventually, i added cpu and memory checks to kill processes that go stray for too long, which doesn't happen that often.

however, now the task that constantly uses too much memory and cpu is... the very task that is supposed to be watching for tasks using too much memory and cpu.

Continue reading 198 words...