Identity/BrowserID/ServerImplementation

From MozillaWiki
< Identity‎ | BrowserID
Revision as of 19:11, 23 August 2011 by Aking (talk | contribs) (Capturing discussion with jbalogh and llyod)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BrowserID is built on Node.js.

In terms of scaling the service to 1 million users and later 10 million users, we should examine the best technology choices.

Requirements

  • CPU bound, mostly crypto workload
  • C10K style to reduce need for hardware
  • Prefer horizontal scaling over vertical scaling

Application Server Platforms

We'll assume Zeus (frontend caching, load balancing), nginx (static web server), MySQL (RDBMS) and Socketlabs (outbound email).

Node.js

BrowserID is currently a Node.js application with multi-master MySQL.

Scaling tips

It's early days. Although projects like Cluster exist, Mozilla may end up trail blazing how to scale the system.

gunicorn/gevents

Firefox Sync's service is gunicorn plus SQLAlchemy. Sync has ? million API calls per day on ?? servers, ?? master/slave dbs, and ???

Sync has continuous integration and sophisticated deployment practices.

Playdoh

This is a secured Django plus Jinja templates and other goodness. Baseline framework for webdev projects. Powers AMO which does roughly 50 million API calls per day (cache misses 91M including cache hits somewhere in the stack). Roughly 25 app servers, 6 slave DBs, 3 memached.

AMO has continuous integration and sophisticated deployment practices.

Scaling tips

Hotspots bypass ORM and do straight SQL plus string interpolation.

Evaluation Matrix

TODO: topics

  • Mozilla dev pool (small, medium, big)
  • Ops familiarity (low high)
  • External community
  • In production today
  • C10K
  • Sweet spot (webapps, services, etc)
  • Libraries
  • Development (PITA, pleasure)
  • Deployment (easy, hard)
  • Infrasec comfort level (low, high)