-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Services
There are several runscripts in the /srv/ directory of the repository.
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.
In an effort to better mimic the reddit.com 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.
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.