서버인프라 구축 입문 basis of composing server and infra

  • View
    796

  • Download
    6

Embed Size (px)

Text of 서버인프라 구축 입문 basis of composing server and infra

  • 1. / 1./ : / 1.1 / 1.2 Hwanseok, Park

2. VIP ( Virtual IP ) IP ICMP ( Internet Control Message Protocol ) IP / ARP ( Address Resolution Protocol ) MAC GARP ( Gratuitous ARP ) IP , MAC ( Availability ) Round Robin cpu 3. 1.1 4. 5. Disaster recovery , , , For example, of companies that had a major loss of business data, 43% never reopen and 29% close within two years. IT DR Preventive measure Detective measure Corrective measure. 6. ?Redundancy is 9.11 Disasters Recovery 1 DNS Round Robin Load Balancer 7. (Availability) Availability of a system is typically measured as a factor of its reliability- as reliability increases, so does availability. availability reliability ? Blog 8. , , 9. Hot Standby Cold StandbyHot Standby . Cold Standby 10. 11. 12. 10.0.0.101 10.0.0.1 10.0.0.1 !10.0.0.102 13. ip_takeover() { MAC=ip link show $DEV | egrep -o ([0-9a-f]{2{:){5}[0-9a-f]{2} | head -n 1 | tr -d : ip addr add $VIP/24 dev $DEV send_arp $VIP $MAC 255.255.255.255 ffffffffffff } 64bytes from 10.0.0.1: icmp_seq=5 ttl=64 time 0.453 ms 64bytes from 10.0.0.1: icmp_seq=6 ttl=64 time 3.73 ms ... 64bytes from 10.0.0.1: icmp_seq=8 ttl=64 time 0.418 ms 64bytes from 10.0.0.1: icmp_seq=11 ttl=64 time 3.20 ms 14. Health Check ICMP ( Layer 3) Webserver (Layer 4) (Layer 7) Web server 15. 1.2 16. DNS DNS round robin is DNS 10.0.0.101 IP . 10.0.0.101 DNS 10.0.0.101 10.0.0.102Ex.com 1 10.0.0.101 17. DNS 10.0.0.1 (VIP) 1 10.0.0.101 10.0.0.2 (VIP) 2Ex.com 10.0.0.102 10.0.0.101 10.0.0.1 2Ex.com 10.0.0.2 10.0.0.102 18. 1 2 vip script VIP script ICMP Ping curl VIP IP VIP ip_del() While true 19. ip_add() {MAC = ip link show $DEV | egrep -o ([0-9a-f]{2}:){5}[0-9a-f]{2} | head -n 1 | tr -d :ip addr add $1/24 dev $DEVsend_arp $1 255.255.255.255 ffffffffffff ip_takeover }-, webserver ip_del() {ip addr del $1/24 dev $DEV IP vip }healthcheck() {for I in $VIP;doif(["200" -ne "curl -s -I http://$i/ | head -n 1 | cut -f 2 -d]; thenif[-z"ip addr show $DEV | grep $i" ]; then ip_add $ielse ip_del $iwhile true; do healthcheck;sleep 1;done 20. 2->3 vip ? vip 1.3 Load Balancer 21.