Commit Graph

111 Commits

Author SHA1 Message Date
Neil Williams
e412fdcde7 Shard vote_link_qs by last digit of subreddit ID.
This should help with permacache contention.
2012-11-12 16:02:59 -08:00
Max Goodman
440cb664ac Move gold prices to configuration parameters. 2012-11-08 10:12:51 -08:00
shlurbee
3fe8471c5c Add email link to promo traffic help page 2012-10-29 12:28:00 -07:00
Neil Williams
a6da54dcfd Add missing gold checkout stuff to example.ini. 2012-10-16 14:03:08 -07:00
Max Goodman
db7b531a71 Change moderator adding to an invite system. 2012-10-09 15:38:13 -07:00
Neil Williams
b2ad131cbb Subreddit CSS: Store subreddit CSS on S3 and minify it.
This means that stylesheets can have all the advantages of other static
files, such as not having session cookies in the request. In addition,
it also means that subreddit objects are drastically smaller in memcache
which saves internal bandwidth and increases cache capacity.
2012-09-25 15:39:06 -07:00
Andre D
5fe4e997d8 Wiki: Base wiki code
- Updates snudown dep
2012-09-11 15:43:07 -07:00
Andre D
ebab524e5d Diff3: Added diff3 wrapper 2012-09-11 15:36:38 -07:00
Neil Williams
2a8cc84faa Refactor user authentication to be more modular.
This allows alternate authentication methods to be easily plugged in for
custom installs of reddit, such as LDAP on intranets.
2012-08-31 11:39:04 -07:00
Neil Williams
a8c6631c40 Comment Pane Cache: make cache lifetime configurable in INI.
This allows us to independently vary it on some servers via ini file
(i.e. fastlane).
2012-08-30 13:28:47 -07:00
Neil Williams
c337280e47 fastlane: Separate votes on some links and their comments.
If a specific link has ridiculous traffic, we can inform the
apps (via ZK live config) that votes on it should be sent to a
separate, dedicated, queue to avoid overwhelming the rest of the
system.
2012-08-30 13:27:12 -07:00
Neil Williams
1b6423a073 example.ini: Document subreddit suggester live config options. 2012-08-30 13:27:11 -07:00
Max Goodman
613b27de9e Add subreddit interest discovery bar. 2012-08-20 17:34:19 -07:00
Keith Mitchell
01146c301e Remove unused r2.po and friends from repo
Note that pylons.wsgiapp uses pylons.i18n's get_lang()
and friends, instead of our modified versions in
r2.lib.translation. This means that setting 'lang' in the
conf causes it to try and 'help' us by looking up PO files
in r2/i18n. Changing the ini files to use 'site_lang' as the
key gets around that.
2012-08-14 12:19:20 -07:00
shlurbee
b1ed5e0f4e Move sr discovery links to zookeeper
This change will allow us to change the links without doing a code push
2012-08-13 11:07:27 -07:00
Keith Mitchell
987be0d961 Replace reference to #subreddit with /r/subreddit 2012-08-07 10:02:04 -07:00
Neil Williams
4a4543b38b Move frontpage_dart option into new live config.
Enabling home page roadblocks has never been so easy!
2012-08-02 17:14:36 -07:00
Neil Williams
f495dad2a8 Add ZooKeeper-based dynamic configuration system.
The dynamic configuration system has two components: the app, which
reads, and the writer script. The latter is meant for use by humans, and
converts a [live_config] section of the INI file into JSON for storage
in ZooKeeper. The app will read this data on startup and place a watch
on the node to be notified, by ZooKeeper, of changes. This means that
running the writer script with new data will automatically propagate the
changes to every app very quickly, without restart.

The writer script relies on a human-entered password to authenticate
with ZooKeeper. The reddit app uses a different set of credentials
(specified in the INI file) to obtain read-only access to the
configuration data.

Also adds a new "live_config" spec to reddit and plugins. This spec is
parsed at write-time only and the parsed values are stored as JSON in
ZooKeeper.
2012-08-02 17:14:36 -07:00
Neil Williams
0b09f25b28 Add basic support for ZooKeeper via Kazoo.
At this point, we can connect and pass authentication credentials!
2012-08-02 17:14:36 -07:00
Max Goodman
482e8644d8 Fire a pixel for UI flow tracking of sub/unsubscribe.
This will allow us to collect information about how users found
subreddits that they subscribe to. We can use this information to test
the effectiveness of new ways of discovering and subscribing to
subreddits.

Specifically, when the subscribe button is clicked, for the current page
and previous page: the URL, referrer URL, and the type of UI element
clicked are sent. We'll use this to answer questions like:

 * "did clicking on gizmo A lead to users subscribing to subreddit B?"
 * "why did we see a spike in subscriptions to subreddit X today?"
2012-07-27 17:25:04 -07:00
Max Goodman
d433cb2970 Remove production pixel URL from example.ini. 2012-07-26 13:44:45 -07:00
Neil Williams
1db68ce6b1 Require two-factor authentication to enable admin mode.
This feature can be disabled with the new ini setting
`disable_admin_otp`.
2012-07-23 15:59:17 -07:00
Neil Williams
8dfd73b195 Add framework for RFC-6238: Time-Based One Time Password Algorithm.
This provides a system for two-factor authentication, using a compliant
OTP-generator such as Google Authenticator. The framework includes a
validator for use on API calls needing authentication as well as a UI
for provisioning/resetting your secret key. A secure cookie may be
generated to effectively turn the user's browser into a temporary
authentication factor.

This feature is currently limited to admins only until full-site SSL is
available.
2012-07-23 15:59:17 -07:00
Neil Williams
4169226735 Make profiling transparent and aggregatable.
If the config variable profile_directory is set, ProfilingMiddleware
will be added to the WSGI stack. The middleware will generate a file in
the specified directory on each request containing the contents of that
request's profile.
2012-07-23 18:57:00 -04:00
Neil Williams
9cd5fed51d Add traffic to example.ini. 2012-07-14 09:30:06 -07:00
Neil Williams
7118bde472 Turn CNAMEs into a simple redirect. 2012-06-28 13:32:56 -07:00
Keith Mitchell
973005d2df Remove references to deprecated Solr index 2012-06-18 23:37:31 +01:00
Keith Mitchell
213dd1e0df Add CLOUDSEARCH_SUBREDDIT endpoints to example.ini 2012-06-14 11:43:11 -07:00
Keith Mitchell
a8d55dd77a Set ratelimits on subreddits 2012-06-12 16:11:36 -07:00
shlurbee
55d2038354 Update config with new promocampaign thing table 2012-06-04 11:51:37 -07:00
Neil Williams
f5b6839a78 Losslessly optimize JPEGs.
Disabled by default in example.ini. Install jpegoptim
or an equivalent and set the configuration properly.
2012-06-01 13:48:24 -07:00
Neil Williams
ab039b4722 Use a different set of memcaches for locking. 2012-05-29 12:15:59 -07:00
shlurbee
09dbd49445 Update config with new promocampaign thing table
Adds promocampaign table (needed for the PromoCampaign model introduced in the
previous commit) to example.ini
2012-05-24 20:24:08 -07:00
Keith Mitchell
c209cc2f32 Switch to cloudsearch as primary search provider
Also, remove unused indextank files
2012-05-15 08:21:01 -07:00
Keith Mitchell
abe385cc74 Add note to top of generated ini files 2012-03-29 11:36:53 -07:00
Neil Williams
a42505c50a Keep admin cookie around if actively used. 2012-03-14 11:55:42 -07:00
Neil Williams
33b15bc265 Split the admin cookie out from the session cookie. 2012-03-13 15:46:37 -07:00
Neil Williams
9f0ec95138 Split table definitions from db configuration. 2012-03-05 16:45:45 -08:00
Neil Williams
fbe867ef72 Implement new lockless query cache. 2012-02-09 09:28:04 -08:00
Neil Williams
fcd3f3bba3 Make cassandra connection pool size configurable. 2012-02-02 14:45:06 -08:00
Max Goodman
8b5cad8687 Move toggle for template caching into its own .ini flag. 2012-01-31 13:38:04 -08:00
Neil Williams
e7b672d6b0 Replace proxy_addr with option to trust proxies in 10.0.0.0/8. 2012-01-23 09:17:59 -08:00
Neil Williams
706b27b24c Remove all remaining traces of the unused service cache. 2012-01-09 16:04:44 -08:00
Neil Williams
532be3fe2a Allow Cassandra models to choose a connection pool.
Note: some CFs are explicitly marked for the "main" connection
pool and others are not. This is an artifact of the current
state of reddit.com's cassandra setup and is intentional. While
cassandra_default_pool remains "main", this will not cause an issue
for you.
2011-11-30 16:11:39 -08:00
Neil Williams
ee9ee8b484 Get rid of unused profanity filter. 2011-11-21 14:32:17 -08:00
Neil Williams
935d0c0b46 Remove obsolete markdown interpreter selection infrastructure. 2011-11-21 14:32:17 -08:00
Neil Williams
8b7b3a307b Remove discount (markdown interpreter). 2011-11-21 14:32:17 -08:00
Neil Williams
560ca09270 Remove markdown.py and replace scattered uses of it.
It was used directly in two places in pages.py, I've
replaced those uses with safemarkdown calls. In the case
of the search fail page, I just removed the javascript
try-again link since it wouldn't be doable through safemarkdown
and that page isn't hit very frequently any more anyway.
2011-11-21 14:32:17 -08:00
Neil Williams
8865943a4a Add snudown as a markdown backend. 2011-11-17 12:11:51 -08:00
Neil Williams
8350d3f457 Sprite some more of all the things!
Had to convert the three special thumbnail images
to 32-bit PNGs rather than PNG8 with indexed alpha
since PIL does not support the latter. ImageMagick was
awesome for this.
2011-11-14 20:45:17 -08:00