System Design Basic Concepts Flashcards
(132 cards)
Four main things to care about with system design
Performance, Scalability, Availability, Reliability
What do we call the hardware that runs a system?
Machine
What do we call the hardware a client uses?
Device
What’s the difference between a “service” and a “server”?
A server is an instance of a binary that provides many services
What does API stand for?
Application Programming Interface
What is an API?
It defines how programs interact with each other.
What is a good mental test for scalability?
How well could the program behave if capacity was increased ten-fold?
In what context would you use an Entity-Relationship Diagram?
Designing a database schema
What do you call the set of rules used for an Entity-Relationship Diagram?
Unified Modeling Language
What does UML stand for?
Unified Modeling Language
What is monolithic design?
When all software is built and deployed as a single unit
What are “microservices”?
When software is represented as a collection of independent services that communicate with each other
What is “loose coupling” vs. “tight coupling”?
Loose coupling is when different components and services have minimal dependencies on each other.
Tight coupling is when they’re highly-dependent on each other.
What is “high cohesion” vs. “low cohesion”?
High cohesion is when the logic, methods and classes of a single service are functionally related.
Low cohesion is when the service does a lot of overlapping things and has a vague role.
Why is high cohesion good? Four things.
It’s easier to maintain, deploy, test and understand?
What are the two models of interservice interaction?
Orchestration and Choreography
What is orchestration?
A model of interservice interaction one service is the “orchestrator” and manages communication between services.
What is choreography?
A model of interservice interaction where an event stream holds events and each service may produce events or subscribe (listen to) certain events.
What is persistence?
After data is written to a DB, it is stably stored on non-volatile memory.
Volatile vs. non-volatile memory
Volatile memory is erased when it is powered off, like RAM. Non-volatile is like a hard drive, which maintains data even when powered off.
What does NoSQL stand for?
Not Only SQL
What is NoSQL?
Catch-all term for DBs that don’t store data in tables, such as a key-value collection.
What is a normalized database vs. a de-normalized one?
In a normalized database, data is isolated and non-redundant.
A de-normalized database is when data from one table is copied to be part of another. An example is when you have a FrequencyCap table, and a FrequencyCap field on Campaign.
Vertical vs. Horizontal Scaling
Vertical scaling: Increase the resources of a single machine
Horizontal scaling: Adding more machines