๐Ÿ›ณ BE TIL Day 37 0503

j00b33ยท2022๋…„ 5์›” 3์ผ
0

Backend02 Deploy

๋ชฉ๋ก ๋ณด๊ธฐ
3/5
post-thumbnail

โฌ‡๏ธ Main Note
https://docs.google.com/document/d/1sZMHy4FLlMlizJLtX0S6ww5C3U3ftPuKN5LDTaqVAdc/edit


๐Ÿ‹ HTTPS

  • basic port of https: 443
  • Certificate is a file, and if the server adjusts this certificate file, it becomes https.
    Since the process of certificating is complex, this process is done by GCP.

๐Ÿ‹ 3-WAY-Handshake

: Connecting Frontend and Backend Server

  1. Frontend sends sync to backend.
    โžค Containing the context "hey can I connect with you backend?"
  2. Then backend receives that synchronization request and also sends synchronization and acknowledgement to frontend server.
    โžค Contains the context "sure"
  3. Frontend resends acknowledgement to backend
    โžค Contains the context "oki I'm connecting right now"
  • Then while those two servers are linked, the https request can be sent.
    โžค No reconnection, able to keep send requests.
  • When there isn't any request for a while, the the disconnection happens.
    โžค When disconnecting, 4-WAY-Handshake happens.
  • If frontend wants to re-connect with backend, then 3-WAY-Handshake happens again.

๐Ÿ‹ Kubernetes Cluster

: Docker manager

Docker= container
Docker-compose = Bunch of containers
Docker-Swarm = Container Orchestration

๐Ÿ”น Docker Orchestrations

Mesos, Docker-Swarm, Kubernetes, etc
โžค What container orchestration does is something like re-building dead containers

Each computers are connected with network, so docker orchestrations manage docker and its traffics.
โžค At this point, Kubernetes tells which docker is dead and which computer needs more docker.

๐Ÿ”น Why Kubernetes?

Because we don't operate docker in only one computer.
We distribute multiple dockers in diverse computers, so we should manage them.

Problems while deploying
: Let's suppose that we made a backend-API and did docker-compose up
Infront of backend, DNS exists. If I updated createBoard API, we should re-deploy createBoard API again.
To do so, we should do docker-compose stop to stop the original createBoard API, and do docker-compose up to operate the updated API.

But at this point, when we do docker-compose down, the service will stop.
So to deplpoy without any breakpoints, we need Kubernetes.


๐Ÿ‹ Node and POD

๐Ÿ”น Node

A single computer is called Node, and bunch of nodes are called Cluster.
Master computer : Master Node
Other computers : Worker Node

๐Ÿ”น POD

POD contains docker container so that docker can be operated.
โžค Inserting one docker per one POD is regular. But this isnt's a rule.
If dependency between diverse dockers are strong, then those dockers can be in a group of one POD.

Cluster โ†’ Node โ†’ POD โ†’ Container


profile
์ฝฑใ…†l

2๊ฐœ์˜ ๋Œ“๊ธ€

comment-user-thumbnail
2022๋…„ 5์›” 4์ผ

์ž˜.์“ฐ.์‹ .๊ฑฐ.๊ฐ™.๋„ค.์š”.ํ•˜.ํ•˜.ํ•˜ Yolo

1๊ฐœ์˜ ๋‹ต๊ธ€