15. Infrastructure, Docker & DevOps
What is Docker?
JuniorAnswer: A platform for developing, shipping, and running applications in containers, ensuring that the application runs the same in any environment.
Docker ENV vs ARG
MiddleAnswer:
ARG: Variables available only during the image build process.ENV: Variables available during the build and also while the container is running.
What are Docker Volumes?
MiddleAnswer: A way to persist data generated by and used by Docker containers, separated from the container's lifecycle.
What is the difference between Horizontal and Vertical scaling?
MiddleAnswer:
- Vertical Scaling: Adding more resources (CPU, RAM) to a single server.
- Horizontal Scaling: Adding more servers to distribute the load.
What is CI/CD?
SeniorAnswer:
- Continuous Integration (CI): Automating the building and testing of code when changes are committed.
- Continuous Delivery/Deployment (CD): Automating the deployment of code to production or staging environments.
RabbitMQ vs Kafka
SeniorAnswer:
- RabbitMQ: A message broker that focuses on delivering messages to consumers (Push model). Great for complex routing.
- Kafka: A distributed streaming platform that focuses on high throughput and data persistence (Pull model). Great for log processing.