System Design
15 questions — answer mentally, then read the explanations
What you'll learn
- Try to answer each question before reading the explanation
- Cover System Design topics in system design
Questions
Read each question and options, then check the explanation below.
A software company is planning to migrate its monolithic application to a containerized microservices architecture. Outline the steps they should take to accomplish this transition using Docker.
- A. Decompose the monolithic application into smaller, manageable microservices
- B. Create Docker images for each microservice and define their dependencies
- C. Set up a container orchestration platform to manage and deploy the microservices
- D. Deploy the microservices to production and monitor their performance
Explanation
Answer: Create Docker images for each microservice and define their dependencies The steps to migrate a monolithic application to a containerized microservices architecture using Docker involve decomposing the monolith into smaller, manageable microservices, creating Docker images for each microservice, defining their dependencies, setting up a container orchestration platform like Kubernetes or Docker Swarm, and deploying the microservices to production while monitoring their performance.
What component of a CDN helps improve website performance by caching static content closer to users?
- A. Edge Servers
- B. Origin Servers
- C. Load Balancers
- D. Firewalls
Explanation
Answer: Edge Servers Edge servers, positioned geographically closer to users, cache static content. This reduces latency and speeds up content delivery by serving it from a location that minimizes the distance data needs to travel.
An e-commerce website with a global customer base wants to enhance security and protect against cyber attacks. How could a CDN assist in achieving these goals?
- A. DDoS mitigation
- B. SSL/TLS encryption
- C. Two-factor authentication
- D. IP whitelisting
Explanation
Answer: DDoS mitigation A CDN can assist in enhancing security by providing DDoS mitigation. It helps protect against cyber attacks by identifying and mitigating malicious traffic, ensuring the website remains available and secure.
What is the primary purpose of containerization technologies like Docker?
- A. Isolation of applications
- B. Virtualization of hardware
- C. Running multiple operating systems
- D. Accelerating network speed
Explanation
Answer: Isolation of applications The primary purpose of containerization, exemplified by Docker, is the isolation of applications. Containers encapsulate an application and its dependencies, ensuring consistency across different environments.
Which statement best describes the relationship between containers and virtual machines?
- A. Containers are a type of virtual machine
- B. Virtual machines are an abstraction of containers
- C. Containers share the host OS, while virtual machines have their own OS
- D. Containers and virtual machines are synonymous terms
Explanation
Answer: Containers share the host OS, while virtual machines have their own OS Containers share the host OS, while virtual machines operate with their own OS. Containers are lightweight, leveraging the host OS kernel, while VMs emulate entire systems.
What feature of Docker allows developers to package their applications and dependencies into a standardized unit?
- A. Docker Compose
- B. Docker Swarm
- C. Docker Hub
- D. Docker Image
Explanation
Answer: Docker Image Docker Image is the feature that enables developers to package applications and dependencies into a standardized unit. Images serve as the blueprint for containers, ensuring consistent deployment across different environments.
In Docker, what is the role of a Dockerfile?
- A. A script that automates the installation and configuration of Docker on a host machine
- B. A configuration file for Docker Compose
- C. A file that defines a Docker image, including its base image, dependencies, and commands
- D. A log file generated by Docker during container runtime
Explanation
Answer: A file that defines a Docker image, including its base image, dependencies, and commands A Dockerfile is a script that defines a Docker image. It contains instructions for building the image, specifying the base image, adding dependencies, and configuring the environment.
Which component of Docker is responsible for managing container lifecycles?
- A. Docker Engine
- B. Docker Registry
- C. Docker Daemon
- D. Docker Compose
Explanation
Answer: Docker Daemon The Docker Daemon is responsible for managing container lifecycles. It receives commands from the Docker CLI, communicates with the Docker Engine, and oversees the creation, running, and stopping of containers.
What is the difference between Docker images and Docker containers?
- A. Images are lightweight, read-only templates used to create containers. Containers are running instances of images with a writable layer.
- B. Images are running instances of containers. Containers are templates used to create lightweight, read-only images.
- C. Images and containers are the same thing, and the terms can be used interchangeably.
- D. Images are executable files, while containers are directories containing application code.
Explanation
Answer: Images are lightweight, read-only templates used to create containers. Containers are running instances of images with a writable layer. Docker images are lightweight, read-only templates used to create containers. Containers are running instances of images with an additional writable layer for runtime changes.
What are some advantages of using Docker containers in a microservices architecture?
- A. Isolation, Portability, Resource Efficiency, Scalability
- B. Parallelism, Load Balancing, Centralized Control, Tight Coupling
- C. Virtualization, Monolithic Architecture, Shared Resources, Single Point of Failure
- D. Microsegmentation, In-Memory Databases, Asynchronous Communication, Tight Coupling
Explanation
Answer: Isolation, Portability, Resource Efficiency, Scalability Docker containers offer advantages such as isolation, ensuring applications run consistently across environments; portability, allowing seamless deployment; resource efficiency, optimizing utilization; and scalability, facilitating easy scaling of microservices.
_________ is a text file that contains instructions for building a Docker image.
- A. Dockerfile
- B. Containerfile
- C. Buildfile
- D. Imagetext
Explanation
Answer: Dockerfile A Dockerfile is a text file that contains instructions for building a Docker image. It specifies the base image, adds layers for configuration, and defines commands to run when the container starts.
Docker containers share the same _________ as the host operating system, making them lightweight and efficient.
- A. Kernel
- B. Filesystem
- C. Network
- D. Processor
Explanation
Answer: Kernel Docker containers share the same kernel as the host operating system, which contributes to their lightweight and efficient nature. They use the host OS kernel but have their isolated filesystem and processes.
One advantage of containerization is __________, allowing developers to easily replicate development environments across different machines.
- A. Portability
- B. Scalability
- C. Flexibility
- D. Efficiency
Explanation
Answer: Portability Portability is a significant advantage of containerization. It enables developers to replicate development environments seamlessly across different machines, ensuring consistency and reducing compatibility issues.
_________ is a Docker feature that allows multiple containers to share the same kernel resources.
- A. Docker Swarm
- B. Docker Bridge Network
- C. Docker Namespace
- D. Docker Overlay Network
Explanation
Answer: Docker Namespace Docker Namespace is a Docker feature that allows multiple containers to share the same kernel resources. It provides isolation between containers by maintaining separate namespaces for processes, networks, and other system resources.
Docker volumes provide a way to persist data outside of the container's __________.
- A. Filesystem
- B. Memory
- C. Cache
- D. Registry
Explanation
Answer: Filesystem Docker volumes provide a way to persist data outside of the container's filesystem. This allows data to be retained even if the container is stopped or removed, enhancing data durability and portability.
Today's exercise: Review & recall
Revisit any questions you hesitated on. Write one-line answers in your own words.
Steps
- 1
First pass
Read each question and pick an answer without looking at the explanation.
- 2
Second pass
Expand explanations only for questions you missed or were unsure about.
- 3
Notes
Jot down 3 terms or patterns you want to remember from this batch.
