Jay's Cookbook
Menu
  • Tags
  • Categories
  • Projects
Computer Science
OS
Network
Data Structure
Algorithm
Language
Code Architecture
Python
Javascript
Typescript
Java
Backend
Backend Theory
TypeORM
Node.js
NestJS
FastAPI
Frontend
HTML/CSS
React
Next.js
Data Engineering
DE Theory
MySQL
MongoDB
Elastic
Redis
Kafka
Spark
Airflow
AI
Basic
Pytorch
NLP
Computer Vision
Data Analytics
Statistics
Pandas
Matplotlib
DevOps
Git
Docker
Kubernetes
AWS
[Network] 네트워크 활용편(4) 로드 밸런서(Load Balancer)
CS
network

[Network] 네트워크 활용편(4) 로드 밸런서(Load Balancer)

Jay Kim
Jay Kim 16 Jul 2022
[Network] 네트워크 활용편(3) Linux Network 관련 명령어 [Network] 네트워크 용어(1): NAT, DHCP

Table of Contents

  • 로드 밸런싱의 정의
  • 로드 밸런서의 특징
  • 로드 밸런서가 제공하는 이점
  • 로드 밸런싱 방법
    • Round Robin Algorithm
    • Least connections
    • Source IP hash
  • Software Load Balancers vs. Hardware Load Balancers
  • 로드 밸런서 종류
  • 참고

로드 밸런싱의 정의

Load balancing is the process of distributing network traffic across multiple servers. This ensures no single server bears too much demand. By spreading the work evenly, load balancing improves application responsiveness. It also increases availability of applications and websites for users. Modern applications cannot run without load balancers. Over time, software load balancers have added additional capabilities including application security.

로드 밸런서의 특징

  • 로드 밸런서는 어떤 서버가 해당 트래픽을 처리할지 결정한다. 이것은 좋은 사용자 경험을 유지시키는데 도움을 준다
  • 로드 밸런서는 계속해서 서버의 상태를 체크한다

로드 밸런서가 제공하는 이점

  • 서버 장애를 자동으로 감지
  • Provide automated disaster recovery to backup sites
  • Add and remove application servers without disruption
  • Monitor and block malicious content

로드 밸런싱 방법

Round Robin Algorithm

  • 가중 라운드 로빈 방식 (Weighted Round Robin): 서버의 사양에 맞게 트래픽을 배분한다
  • 동적 라운드 로빈 방식 (Dynamic Round Robin): 실시간 계산을 통해 트래픽을 배분한다

Least connections

  • 커넥션이 가장 적은 서버에 연결한다

Source IP hash

In a source IP Hash, load balancing a server is selected based on a unique hash key. The Hash key is generated by taking the source and destination of the request. Based on the generated hash key, servers are assigned to clients.

  • 요청의 출발지 IP 주소와 도착지 IP 주소에 기반해 해시 키를 생선한다
  • 생성된 해시 키에 기반해 클라이언트에 서버가 할당된다

Software Load Balancers vs. Hardware Load Balancers

로드 밸런서 종류

  • L7:

  • Network Server Load Balancers(NLB)
    • L4 로드 밸런서
    • IP주소 + 포트 번호에 기반해 트래픽을 로드 밸런싱
  • Application Load Balancers(ALB)
    • L7 로드 밸런서
    • HTTP 헤더, URL 과 같은 속성을 이용해 트래픽을 로드 밸런싱
  • Elastic Load Balancers(ELB): Elastic Load Balancing scales traffic to an application as demand changes over time. It uses system health checks to learn the status of application pool members (application servers) and routes traffic appropriately to available servers, manages fail-over to high availability targets, or automatically spins-up additional capacity.

참고

  • AVI Networks: What Is Load Balancing?
  • Progress Kemp: What is load balancing?
  • Jae Honey, L4 / L7 로드밸런서 차이 (Load balancer)
[Network] 네트워크 활용편(3) Linux Network 관련 명령어 [Network] 네트워크 용어(1): NAT, DHCP

You may also like

See all network
17 Jul 2022 [Network] 네트워크 용어(5): ssh
CS
network

[Network] 네트워크 용어(5): ssh

17 Jul 2022 [Network] 네트워크 용어(4): DNS
CS
network

[Network] 네트워크 용어(4): DNS

17 Jul 2022 [Network] 네트워크 용어(3): IPC, RPC
CS
network

[Network] 네트워크 용어(3): IPC, RPC

Jay Kim

Jay Kim

Web development, data engineering for human for the Earth. I share posts, free resources and inspiration.

Rest
Lifestyle
Hobby
Hobby
Hobby
Hobby
2025 © Jay's Cookbook. Crafted & Designed by Artem Sheludko.