Commit Graph

37 Commits

Author SHA1 Message Date
Kevin O'Connor
38fbe363da Remove donate plugin. 2016-09-14 12:53:44 -07:00
Kevin O'Connor
72a76f8030 Remove the meatspace plugin. 2016-09-12 15:37:56 -07:00
Zean Tsoi
05b24d44da Specify plugins to be installed by default on Vagrant builds
Plugins must meet the following requirements in order to be installed
on a Vagrant build:

1. Be listed in `plugins` in the Vagrantfile
2. Be cloned to the designated install directory
3. Adhere to plugin naming conventions

This applies to all open-source plugins.
2016-08-04 13:13:14 -07:00
Neil Williams
17ff73f70e Install ZK on travis and wait for it to start
This should fix Travis and occasional failures in Drone where ZK isn't
present / wasn't started yet.
2016-07-28 12:07:21 -07:00
Brian Simpson
9c371f08e2 Use mcrouter for relcache and srmembercache 2016-07-18 13:54:05 -07:00
Neil Williams
6dbe772e03 Remove the pagecache
With some experimentation, we've determined that it is not necessary for
the site to function these days. There's no noticeable effect on p90 or
p99 response times in the loggedout cache pool and several large traffic
events have occurred while the pagecache was off. By removing this
layer, we reduce complexity, remove a possible source of poisoning bugs,
and make it easier to do stuff like logged out A/B experiments.
2016-07-06 13:44:06 -07:00
Brian Simpson
28332d6430 Query: move caching to g.gencache and make key human readable 2016-06-21 13:58:37 -07:00
Brian Simpson
387becd9e4 LocalizedSubreddits: Use g.gencache 2016-06-20 16:20:13 -07:00
Brian Simpson
c94ea00fd2 Subreddit._by_name: Use g.gencache 2016-06-20 16:07:03 -07:00
Brian Simpson
18fb269f1b rising: Use g.gencache 2016-06-20 16:06:53 -07:00
Brian Simpson
753039574e promote: Use g.gencache 2016-06-20 16:06:53 -07:00
Brian Simpson
004895b8ef geoip: Use g.gencache 2016-06-20 16:06:49 -07:00
Brian Simpson
7e0a7678da voting: Use g.gencache for queued votes 2016-06-20 16:06:42 -07:00
Brian Simpson
260268df5b captcha: Store solutions in g.gencache 2016-06-20 16:06:37 -07:00
Brian Simpson
cf73f43adc api: Use g.gencache for storing otp secret 2016-06-20 16:06:30 -07:00
Neil Williams
0d74afb00c Install ZooKeeper in dev and make liveconfig/secrets easier
This installs a ZooKeeper server in development and adds two
configuration options. Live config and Secrets can now be sourced from
either ZooKeeper or the local config. This allows local installs to
continue with the easy workflow of just modifying the INI file to test
out changes, while allowing us to develop ZK features locally as well
(such as throttles).
2016-06-15 11:15:52 -07:00
Greg Taylor
f232301489 Add .drone.yml and install/drone.sh for Drone CI
.drone.yml is used by Drone CI to execute builds in response to pushes to
the repo. install/drone.sh is similar to the existing install/travis.sh in
that it does some final work to prep the environment for running tests.
2016-06-15 11:10:10 -07:00
Brian Simpson
d22822aae6 mcrouter: Add prefixes for Award, Trophy, Flair, Friend, Inbox, Report, ModeratorInbox 2016-06-02 13:29:26 -07:00
Brian Simpson
9e0669fc0a setup_mcrouter.sh: Use named_handles to reduce repetition 2016-06-02 13:29:21 -07:00
Brian Simpson
fcfefebd48 setup_mcrouter.sh: Use local route as wildcard fallback
In local dev we'll only ever have a single cache pool with all
keys routed to it. Set the wildcard fallback so that all keys are
routed even if the mcrouter config isn't fully up to date.
2016-06-02 09:21:45 -07:00
Brian Simpson
424719c74c setup_mcrouter.sh: Add routes for comment, message, and campaign 2016-05-24 15:28:41 -07:00
Brian Simpson
4655b29ce0 setup_mcrouter.sh: Add route for "link:" 2016-05-24 15:28:15 -07:00
Brian Simpson
6f0b1f0e3b Transition Account objects to g.maincache 2016-05-18 12:17:25 -07:00
Brian Simpson
4a8d1b2436 Transition Subreddit objects to g.maincache 2016-05-11 12:09:12 -07:00
rrmckinley
396fb26291 Include httpagentparser dep in install_apt.sh
A recent commit included httpagentparser in setup.py, but not
install/install_apt.sh. This makes the dependencies match.
2016-05-05 21:59:51 -07:00
Neil Williams
7317206b38 install-reddit: Install activity service in local testing 2016-04-20 14:10:17 -07:00
Neil Williams
4f84bfb724 install-reddit: Replace sutro with websockets service
This replaces sutro with the new baseplate websockets service that made
its debut for Robin.
2016-04-20 14:10:17 -07:00
David King
e349f1317f Add snappy dependency for upcoming feature 2016-03-03 14:43:06 -08:00
Neil Williams
77c2a2ae16 install-reddit: Print out the conclusion text for non-vagrant users
This required a little more hygiene with the working directory during
the install stuff so that we can find the done script at the end.
2016-03-02 10:54:54 -08:00
Neil Williams
ce015068db install-reddit: Don't build statics
This speeds up builds and is unnecessary to do because uncompressedJS is
on by default.
2016-03-02 10:54:54 -08:00
David King
c8f10bb7b8 Parallelise parts of mr_top jobs
**Explanation**: compute_time_listings is slow. Really slow. At a quick glance, here are the jobs running right now:

    date: Sun Jan 17 20:04:56 PST 2016
    -rw-rw-r-- 1 ri ri 1.2G Jan 17 12:37 comment-week-data.dump
    -rw-rw-r-- 1 ri ri 683M Jan 17 12:25 comment-week-thing.dump
    -rw-rw-r-- 1 ri ri  53G Jan 16 07:13 comment-year-data.dump
    -rw-rw-r-- 1 ri ri  31G Jan 16 04:37 comment-year-thing.dump
    -rw-rw-r-- 1 ri ri 276M Jan 17 17:04 link-week-data.dump
    -rw-rw-r-- 1 ri ri  70M Jan 17 17:03 link-week-thing.dump

So the currently running top-comments-by-year listing has been running for nearly 37 hours and isn't done. top-comments-by-week has been running for 8 hours. top-links-by-week has been running for 3 hours. And this is just me checking on currently running jobs, not actual completion times.

The slow bit is the actual writing to Cassandra in `write_permacache`. This is mostly because `write_permacache` is extremely naive and blocks waiting for individual writes with no batching or parallelisation. There are a lot of ways to work around this and some of them will become easier when we're not longer writing out to the permacache at all, but until then (and even after that) this approach lets us keep doing the simple-to-understand thing while parallelising some of the work.

**The approach**: `compute_time_listings` is written as a mapreduce job in our `mr_tools` toolkit, with `write_permacache` as the final reducer. In `mr_tools`, you can run multiple reducers as long as a given reducer can be guaranteed to receive all of the keys for the same key. So this patch adds `hashdist.py`, a tool that runs multiple copies of a target job and distributes lines to them from stdin using their first tab-delimited field to meet this promise. (The same script could apply to mappers and sorts too but in my tests for this job the gains were minimal because `write_permacache` is still the bottleneck up to a large number of reducers.)

**Numbers**: A top-links-by-hour listing in prod right now takes 1m46.387s to run. This patch reduces that to 0m43.960s using 2 jobs (a 60% savings). That top-links-by-week job that before I killed after 3 hours completed in 56m47.329s. The top-links-by-year job that I killed last week at over 36 hours finished in 19 hours.

**Downsides**: It costs some additional RAM: roughly 10mb for hashdist.py and 100mb in memory for each additional copy of the job. It multiplies the effective load on Cassandra by the number of jobs (although I have no reason to believe that it's practical to overload Cassandra this way right now; I've tested up to 5 jobs).

**Further work**: with this we could easily do sort|reducer fusion to significantly reduce the work required by the sorter. `hashdist.py` as written is pretty slow and is only acceptable because `write_permcache` is even slower; a non-Python implementation would be straight forward and way faster.
2016-02-18 15:35:58 -08:00
Matt Lee
06ebd786a2 install-reddit: Add reddit-serve helper script
Runs the app in the terminal so you can see logs and use pdb.
2016-02-18 12:27:03 -05:00
Chris Slowe
81f5d74cc2 Fix install-reddit.sh to once again work via wget without checkout out the repository 2016-01-28 11:25:54 -08:00
Kevin O'Connor
f83cb007a7 Remove notifications_q. 2016-01-21 17:02:51 -08:00
Chris Slowe
af49fa322b Testing: add vote unit test and coverage script 2016-01-21 13:45:25 -08:00
Daniel Ellis
1ffeeb5bc9 install-reddit: Enable rabbitmq management interface.
Enable port forwarding in Vagrantfile from host to guest
for management interface.
2016-01-19 10:56:17 -08:00
Chris Slowe
69698a9d12 Add Travis-CI integration.
The only way to test travis is to deploy to master with a `.travis.yml` file and wait for travis-ci to pick up the change.  To do some pre-testing here, the `Vagrantfile` has been split into two distinct machines:

 * `default` is, as before, the full reddit build (we have an opportunity to rename this)
 * `travis` is a minimal install with only the packages and services required to run `nosetests` against the codebase.  It tries to mimic what will happen when we try to build this on travis-ci's workers.

As part of this addition, I've moved `install-reddit.sh` to `install/reddit.sh` and populated that `install` folder with common scripts used for both `default` and `travis` builds.
2016-01-14 15:50:47 -08:00