Skip to content


Subversion checkout URL

You can clone with
Download ZIP


spladug edited this page · 4 revisions

There are several runscripts in the /srv/ directory of the repository. This page aims to document what they do.


cassandra and memcached

These runscripts are provided in case your platform does not provide runscripts for Cassandra and memcached. If they are provided, you can elect not to use these.

haproxy and reddit-app0{1,2}

In an effort to better mimic the production environment, these runscripts create two separate app processes which are load balanced by haproxy. haproxy will bind to port 80, while the two apps will be bound to 8001 and 8002 respectively.


The service monitor system is designed to maintain information on the status and load of various servers. By default, these runscripts monitor the reddit apps and cassandra. If a master/slave replication scheme is used for postgres, the service monitor can watch the loads on the slaves and help the apps balance their reads across the slaves.

Queue Processors

vote_link_q and vote_comment_q

Voting on a link or comment inserts an item on one of these queues. The queue processors read the votes and process them to detect cheating then update the scores accordingly.


When a link is submitted, it is added to the scraper_q for deferred processing. This queue processor works through the submitted links and will scrape the submitted URL for media embed information and thumbnails.


After a comment is created, this queue processor does the work of updating the comment tree data structures.


This processor inserts items onto the /comments listing. It exists because the lock contention of prepending to the list from every app was too high.

Something went wrong with that request. Please try again.