- https://github.com/donnemartin/system-design-primer
Examples:
- Codebase: Use VCS (git), one codebase per app. Refactor shared code into libraries.
- Dependencies: Declare and isolate dependencies, vendor if necessary.
- Config: Use environment variables, do not group them together.
- Backing services: Treat them (MySQL, RabbitMQ) as attached resources via config.
- Build, release, run: Strict separation between these stages, releases cannot be mutated and are append-only.
- Processes: Processes are stateless and share-nothing. Implement sticky sessions using Memcached or Redis.
- Port binding: Export services via port binding.
- Concurrency: Scale out via the process model horizontally.
- Disposability: Fast startup and graceful shutdown using disposable processes.
- Dev/prod parity: Keep development, staging, and production as similar as possible, continuous deployment.
- Logs: Print unbuffered to stdout and should be captured by the executing environment.
- Admin processes: Run admin/management tasks as one-off processes.
- Hide servers behing a load balancer.
- Servers does not store any user related data, store sessions in an external cache.
- Denormalize and use NoSQL + cache
- Try to retrieve data from cache and use database on miss.
- Cache objects (sessions, articles, activity streams, user relations) instead of queries.
- Async
- Precomputing (pre-render static html for CDN)
- Job queues
[Blogs]
Comments