Rules for Designing the System for Scalability
- Don’t over engineer. Keep the design simple.
- Design scaling into the design.
- Design for 20x capacity
- Implement for 3x,
- Deploy for 1.5x
- Simplify the scope – Use the 80-20% principle. Which of the 20% feature bring 80% of the benefit?
- Simplify the Design – Use existing solutions (In house, 3rd party).
- Simplify the Implementation
- Split Data & Services effectively. Use Nouns and verbs approach to identify data & services.
- Have a good logging framework – Use right monitoring tools to actively monitor the log and assign resources to look into the logs.
- Don’t duplicate the work – Example: Don’t read the data which was written in the storage for the purpose of validation.
- Remember this analogy – Measure twice and cut only once.
- Use Caching aggressively and effectively.
- Make use of object caches. Implement the cache in its own tier (Example : Application Server).
- Design to Scale out not just Scale up.
- Don’t rely on Testing team to increase quality. Quality have to inbuilt into the system.
- Design for Rollback
- Don’t accept that the application is too complex or that you release code too often as excuses that you can’t roll back. No sane pilot would take off in an airplane without the ability to land, and no sane engineer would roll code that they could not pull back off in an emergency.
- Eliminate Single points of Failure.
- Reduce the number of components that are connected in a series.
- Create a framework to disable/enable features.
- Develop shared libraries to lower the cost of future implementation.
- Develop stateless implementations unless warranted for business reasons.
- Avoid using Multiphase commits in protocol/storage/transactions.
- Always use asynchronous communication to ensure each service and its tier is independent as possible.
- Remove Business logic from Transaction processing.
- o Keep application logic separate from database. Keep database focused on transactions.
- Build hooks into the system to actively monitor it.
Source : Scalability Rules