Câu hỏi phỏng vấn Docker
Câu hỏi

What is Docker Swarm?

Câu trả lời

Docker Swarm is a native clustering and orchestration tool for Docker containers. It allows users to manage and deploy a cluster of Docker nodes, which can be either physical or virtual machines, as a single virtual system. Here are some key points about Docker Swarm:

Key Features

  1. Cluster Management: Docker Swarm integrates with Docker Engine, enabling users to manage a cluster of Docker nodes using the Docker CLI. This integration simplifies the process of creating and managing a swarm without needing additional orchestration software[13][15].

  2. Node Types: In a Docker Swarm, there are two types of nodes:

    • Manager Nodes: Responsible for maintaining the cluster state, scheduling services, and handling the Swarm mode HTTP API endpoints.
    • Worker Nodes: Execute tasks assigned by the manager nodes. Manager nodes can also function as worker nodes[7][10].
  3. Service Discovery and Load Balancing: Docker Swarm provides built-in service discovery and load balancing. Each service in the swarm is assigned a unique DNS name, and the swarm manager automatically balances the load across running containers[13][15].

  4. Scaling: Docker Swarm supports horizontal scaling, allowing users to scale services up or down by adding or removing tasks. The swarm manager adapts to maintain the desired state of the services[13][15].

  5. High Availability: Docker Swarm ensures high availability by replicating services across multiple nodes. If a node fails, the swarm manager can reschedule tasks to other available nodes, maintaining service continuity[5][10].

  6. Security: Docker Swarm enforces TLS mutual authentication and encryption to secure communications between nodes. It also supports role-based access control (RBAC) and other security protocols[13][15].

  7. Rolling Updates: Docker Swarm allows for rolling updates of services, enabling incremental updates across nodes. If an update fails, it can be rolled back to a previous version[13].

Use Cases

Docker Swarm is ideal for small to medium-sized organizations, startups, and projects that require a straightforward and lightwe...

middle

middle

Gợi ý câu hỏi phỏng vấn

expert

Name some limitations of containers vs VM

junior

What is the difference between ‘docker run’ and ‘docker create’?

expert

How does Docker run containers in non-Linux systems?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào