DEV Community

Prashant Mishra
Prashant Mishra

Posted on

System design common pointers

What is the service?
Requirements of the service
Functional requirements: essential for the application
Nonfunctional requirements: other services that we have to keep in mind like reliability, availability, latency, predictability, etc
Extended requirements: like analytics, access to the service through rest apis by other services

Design consideration:
limits, etc of the service
capacity estimations and constraints
traffic estimates
storage estimates
bandwidth estimates
memory( cache size) estimates

System API:
What api the service will be using, what will be the parameters of those api service

Database design:
database schema: involving different tables
what db will you be using like relational or key-value based and why

High-level design:
Explain with a diagram your client-server architecture, how the client will interact with the application server, and how the application server will communicate with the db server/storage or memory/cache servers

Component design:
After explaining the high-level design now, dig deep into the designing of one/all layers of the service
Example:
a. Application layer: How to handle read/write requests, how will your application layer encrypt the data and send it to db for storage?
b. Datastore layer: What database type will be used and why in detail?(with pros and cons of your choices)
c. Finally try to showcase a diagrammatical representation of what you explained in a. application layer, and b. Datastore layer

Purging or db cleanup: How will you clean up the db? ( for expired data or unused data if any)

Data partitioning and replication: How will you do data replication for availability what partition/sharding strategy? will you be using key-based/range-based/dictionary-based sharding, if none of these techniques are useful how will you use(if you have to use consistent hashing) consistent hashing?

Cache: What cache will you use and what percentage of data will be caching?

Load balancer: What type of load balancer will you be using and where will you place these load balancers?
like placing one load-balancer between the client and the application server, one between the application server and the DB server, and one between the application server and the cache server(like Memcache, Redis cache)

Security and permission: What security will you use (like https) and who will have access to this service, how will you handle authorized requests?

Top comments (0)