Scale From 0 To Millions

  • Keep web tier stateless (use NoSQL for session, avoid sticky session)
  • Build redundancy at every tier (for failover - extra datacenter, database, ...)
  • Cache as much as you can
  • Support multiple data centers
  • Host static assets in CDN
  • Scale database using shard
  • Split tiers into individual services (micro-services)
  • Monitor your system (logging) and use automation tools (CI/CD)