SlideShare a Scribd company logo
1 of 40
Scalable Web Architecture




         2010.12.
         DM본부
        기술개발담당



                            1
index

   1. Desirable Properties of a Web App

   2. Reference Architecture
          1. Flickr Architecture
          2. LiveJournal Architecture
          3. Facebook Architecture
   3. Build Scalable Architecture Process
        1. Step 1 - One Server
        2. Step 2 - One Server - Vertical Scaling
        3. Step 3 - Two Server - Vertical Partitioning (Services)
        4. Step 4 - Horizontal Scaling (App Server)
        5. Step 5 - Vertical Partitioning (Hardware)
        6. Step 6 - Horizontal Scaling (DB Scaling)
        7. Step 7 - Vertical / Horizontal Partitioning (DB)
        8. Step 8 - Seperating Sets (Federation)
   4. 엠넷은?




                                                                    2
Desirable Properties of a Web App


•확장성(Scalability)

•고가용성(High Availability)

•성능(Performance)

•응답성(Responsiveness)

•관리성(Manageability)

•저비용(Low Cost)




                                    3
High Availability

고가용성(HA)이란 바람직한 정도로 긴 시간동안 지속적으로 운영이 가
능한 시스템이나 컴포넌트를 가리킨다.
가용성이란 흔히 "100% 가용" 등과 같이 상대적으로 측정되거나 또는 "
절대 고장나지 않음" 등과 같이 표현될 수 있다.
널리 쓰이고 있지만 달성하기 결코 쉽지 않은 시스템 및 제품에 대한 가
용성 표준에 흔히 “파이브 나인(five 9)이라고 부르는 99.999%의 가용성
을 들 수 있다.




                                                4
Architecture

아키텍처란, 프로세스와 전체적인 구조나 논리적 요소들 그리고 컴퓨터
와 운영체계, 네트웍 및 기타 다른 개념들 간의 논리적 상호관계 등을 생
각해내고 정의하는 등, 모든 곳에 적용되는 용어이다.




                                           5
Scalability

확장성(Scalability )은 컴퓨터 애플리케이션이나 제품 (하드웨어나 소프
트웨어)이, 사용자의 요구에 맞추기 위해 크기나 용량을 변경해도, 그 기
능이 계속하여 잘 동작할 수 있는 능력을 말한다. 크기 변화는 대체로 크
기나 용량 면에서 더 커지는 쪽으로 이루어진다.



확장성이 아닌 것:
•스피드나 성능(2GHz vs. 3GHz)
•운영체제(솔라리스 vs. 리눅스)
•소프트웨어 기술(Java vs. Python)
•하드웨어 플랫폼(AMD vs. Intel)
•스토리지 기술(SAN vs. NAS)




                                               6
Vertical vs. Horizontal




          Scale Up        Scale Out


                                      7
Shared Nothing Architecture

정의

      “ A shared nothing architecture (SN) is a distributed
      computing architecture in which each node is independent
      and self-sufficient, and there is no single point of contention
      across the system. “
                                                            - Wikipedia


PHP 창시자인 라스머스 레도르프(Rasmus Lerdorf)가 스케일링의 핵심원리
로 설명

어떤 하드웨어나 소프트웨어 리소스도 공유하지 않는 구조

서비스를 구성하는 리소스를 서버와 함께 분리함 으로서 개개의 서버의
failure로부터 격리하고 높은 scalability를 얻는 구조

쉬운 스케일 아웃


                                                                          8
Reference Architecture - Flickr Architecture




                                               9
Reference Architecture - LiveJournal Architecture




                                                    10
Reference Architecture - Facebook Architecture




                                                 11
Reference Architecture - Facebook Web Architecture




3 service tiers:
     Web/Apache
     Memcached
     MySQL


Uses:
     Linux
     PHP
Build Scalable Architecture Process

문제 발견
  Identify Scalability Bottlenecks
  Identify SPOFs and Availability Issues
  Identify Downtime Impact Risk Zones
해결방안 적용
  Vertical Scaling
  Vertical Partitioning
  Horizontal Scaling
  Horizontal Partitioning
프로세스 반복
Step 1 - One Server




                      14
Step 2 - One Server - Vertical Scaling

                                개요
                                  노드 수를 바꾸지 않고, 하드웨어 리소스를
                                   증가 / 변경

                                장점
                                  • 구조가 단순
                                  • 구현이 쉽다

                                단점
                                  •      하드웨어 증설에 한계
                                  •      증설을 위한 다운시간이 필요함
                                  •      비용이 지수적으로 증가함
                                  •      SPOF(Single Point of Failure)




                                                                         15
Step 3 - Two Server - Vertical Partitioning (Services)

                                 개요
                                   분리된 노드에서 각 서비스를 운영함

                                 장점
                                   • 어플리케이션당 가용성이 증가함
                                   • 태스크 기반에 특화/최적화/튜닝이 가능해
                                     짐
                                   • Context Switching이 줄어듦
                                   • 유연성이 증가됨

                                 단점
                                   • 전체 가용성이 증가하지 않음
                                   • 사이트가 다시 느려짐
                                      • 확장성에 한계
                                      • 쉽게 웹노드 CPU 한계치에 도달함
                                   • Two SPOF(Single Point of Failure)



                                                                         16
Vertical Partioning 이해

Vertical Partioning 이란
     태스크와 기능을 분산시켜 노드수를 늘리는 것
     각 노드 (혹은 클러스터)는 다른 태스크를 수행함

Vertical Partioning은 다양한 레이어에서 수행이 가능함
     어플리케이션
     서버
     데이터
     하드웨어 등




                                          17
Step 4 - Horizontal Scaling (App Server)

                               개요
                                 로드밸런싱을 통해 웹서버의 노드의 숫자를
                                  늘림

                               장점
                                 • 웹서버의 가용성이 증가됨
                                 • 앱의 요건에 큰 변경이 없음
                                 • 유연성이 증가됨

                               단점
                                 • 사이트가 병목현상 존재
                                    • IO 병목
                                    • Database 병목
                                 • SPOF(Single Point of Failure)
                                    • Database
                                    • Public Web Node



                                                                   18
Horizontal Scaling 이해

Horizontal Scaling 이란
     노드 복제를 통해 노드 수를 증가시킴
     각 노드 (혹은 클러스터)는 동일한 태스크를 수행함
     각 노드는 동일함
     특별한 노드의 모음을 클러스터라고 칭함

Horizontal Scaling은 임의의 노드유형에서 수행이 가능함
     웹서버(어플리케이션서버)
     캐시 서버
     DB 서버




                                          19
Load Balancer - Removing SPOF

Active-Standby LB
                            Load Balanced App Server
                            Cluster에서는 로드밸런서가
                            SPOF
                            Setup LB in Active-Active or
                            Active-Passive mode
                                • Note: Active-Active nevertheless
                                  assumes that each LB is
                                  independently able to take up
   Active-Active LB               the load of the other
                                • If one wants ZERO downtime,
                                  then Active-Active becomes
                                  truly cost beneficial only if
                                  multiple LBs (more than 3 to 4)
                                  are daisy chained as Active-
                                  Active forming an LB Cluster



                                                                     20
Step 5 - Vertical Partitioning (Hardware)

                                개요
                                  파일시스템을 외부 스토리지로 분리
                                   (Partitioning)

                                장점
                                  • DB서버의 스케일 업 가능
                                  • DB서버의 퍼포먼스가 향상됨

                                단점
                                  • 비용증가 (SAN)




                                                       21
Caching

연산결과를 저장하여 다음 번 요청에 결과를 재활용
캐싱은 퍼포펀스를 향상시킬 수 있음
Can't hit the DB all the time
   MyISAM: r/w concurrency problems
   InnoDB: better; not perfect
   MySQL has to parse your queries all the time

Cache hit-ratios
Caching Methods
   Generate Static Pages
   Cache full pages
   Cache partial pages
   Cache data
Caching Patterns
   Write-through
   Write-behind(Write-back)
   Sideline cache

                                                   22
Write-through cache




                              App Server




                      ①   ③



                              Cache




                      ②


                              Database




                                           23
Write-back cache




                           App Server




                   ①   ②



                           Cache




                           ③


                           Database




                                        24
Sideline cache




                     App Server
                                  Cache
                           ①


                 ②



                      Database




                                          25
Step 6 - Horizontal Scaling (DB Scaling)

                               개요
                                 DB서버의 노드를 증가시킴

                               옵션
                                 •      Shared nothing Cluster
                                 •      Real Application Cluster (or Shared
                                        Storage Cluster)

                               장점
                                 •      웹서버가 늘어남에따라 DB서버 노드도
                                        추가 할 수 있다
                                    •   DB서버가 더 이상 SPOF가 아니다

                               단점
                                 •      증가에 한계가 있다




                                                                              26
Shared Nothing Cluster

각 DB서버 노드가 완전한
Database copy 를 가지고 있
는것

각 DB서버 노드간에는 아무
것도 공유되지 않음

DB Replication을 통해 완성
됨




                         27
Replication




Master-Slave Replication

Tree Replication

Master-Master Replication

Buddy Replication


                             28
Master-Slave Replication




                           29
Tree Replication (Relay slave replication)




                                             30
Master-Master Replication




                            31
Buddy Replication(Circular Replication)




                                   Node B
                                   Data B
                                  Backup A
                                                  Replication
                   Replication




        Node A                                                    Node C
        Data A                                                    Data C
       Backup E                                                  Backup B


                                                         Replication
             Replication




                        Node E      Replication    Node D
                        Data E                     Data D
                       Backup D                   Backup C



                                                                            32
Buddy Replication(Circular Replication)




                                        Node B
                                       Data B+A
                                       Backup E
                                                       Replication




        Node A                                                         Node C
        Data A           Replication                                   Data C
       Backup E                                                      Backup B+A


                                                              Replication




                    Node E               Replication    Node D
                    Data E                              Data D
                   Backup D                            Backup C



                                                                                  33
Replication Scaling - Reads




Reading scales well with replication

Great for (mostly) read-only applications


           One server                      Two server




              reads
                                  reads                 reads
              writes              writes                writes



                                                                 34
Replication Scaling - Writes




Writing doesn’t scale with replication

All servers needs to do the same writes




      reads           reads     reads      reads    reads




      writes          writes    writes     writes   writes




                                                             35
Step 7 - Vertical / Horizontal Partitioning (DB, Sharding)

                                 개요
                                   데이터를 분할하여 DB 클러스터 수를 늘림

               Load Balanced     옵션
                App Servers
                                   •     Vertical Partitioning – 테이블/컬럼 분리
                                   •     Horizontal Partitioning – rows에 의한
                                         분리




DB Cluster      DB Cluster




                                                                              36
Vertical Partitioning (DB)

                                일련의 테이블을 다른 DB로 옮긴다.
                                   예) 소셜네트워크 – 사용자테이블과 진구테
                                   이블은 분리된 DB Cluster에 저장한다
                                각 DB 클러스터는 다른 테이블을 갖는다.
        App Cluster             Application code or DAO / Driver code
                                or a proxy는 어떤 DB로 쿼리 할지 알고 있다
                                .
                                 컬럼 단위로 분리해서 별도 DB로 나눌 수
                                있다.
DB Cluster 1     DB Cluster 2
  Table 1          Table 3
  Table 2          Table 4      단점
                                   One cannot perform SQL joins or
                                   maintain referential integrity (referential
                                   integrity is as such over-rated)
                                   Finite Limit




                                                                                 37
Horizontal Partitioning (DB)

                                       레코드집합을 다른 DB로 옮긴다.
                                          예) 소셜네트워크 – 각 DB Cluster 는 백만
                                          사용자에 대한 모든 데이터를 포함시킴
                                       각 DB클러스터는 동일한 테이블을 갖는다.
             App Cluster               Application code or DAO / Driver code
                                       or a proxy는 주어진 row에 대해 어느 DB로
                                       쿼리 할지 알고 있다.

                                       단점
DB Cluster 1        DB Cluster 2         SQL unions for search type queries
  Table 1             Table 1            must be performed within code
  Table 2             Table 2
  Table 3             Table 3
  Table 4             Table 4

 1 million users     1 million users




                                                                                38
Step 8 - Seperating Sets (Federation)

                                    글로벌 서비스 제공 시 활용
       Global Redirector            DNS를 통한 글로벌 라우팅


   App                App           장점
  Servers            Servers          무제한 확장이 가능함
  Cluster            Cluster        단점
                                      데이터의 통합이 복잡해짐
DB Cluster         DB Cluster         Set내의 사이징 조절이 필요
                                      Global App settings은 Set간
DB Cluster         DB Cluster         replication이 필요함

  SET 1              SET 2




                                                                   39
엠넷은?




       ?
           40

More Related Content

What's hot

2.apache spark 실습
2.apache spark 실습2.apache spark 실습
2.apache spark 실습동현 강
 
SQL Server to Azure SQL Database Migration
SQL Server to Azure SQL Database MigrationSQL Server to Azure SQL Database Migration
SQL Server to Azure SQL Database Migrationrockplace
 
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)SANG WON PARK
 
대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴
대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴
대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴Terry Cho
 
Optane DC Persistent Memory(DCPMM) 성능 테스트
Optane DC Persistent Memory(DCPMM) 성능 테스트Optane DC Persistent Memory(DCPMM) 성능 테스트
Optane DC Persistent Memory(DCPMM) 성능 테스트SANG WON PARK
 
0222 사내세미나_오정민 스프링인액션
0222 사내세미나_오정민 스프링인액션0222 사내세미나_오정민 스프링인액션
0222 사내세미나_오정민 스프링인액션DataUs
 
Cloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcampCloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcampSang-bae Lim
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안SANG WON PARK
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기AWSKRUG - AWS한국사용자모임
 
AWS Aurora 운영사례 (by 배은미)
AWS Aurora 운영사례 (by 배은미)AWS Aurora 운영사례 (by 배은미)
AWS Aurora 운영사례 (by 배은미)I Goo Lee.
 
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드cranbe95
 
Amazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB DayAmazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB DayAmazon Web Services Korea
 
Azure databases for PostgreSQL, MySQL and MariaDB
Azure databases for PostgreSQL, MySQL and MariaDB Azure databases for PostgreSQL, MySQL and MariaDB
Azure databases for PostgreSQL, MySQL and MariaDB rockplace
 
안정적인 서비스 운영 2013.08
안정적인 서비스 운영   2013.08안정적인 서비스 운영   2013.08
안정적인 서비스 운영 2013.08Changyol BAEK
 
[215]네이버콘텐츠통계서비스소개 김기영
[215]네이버콘텐츠통계서비스소개 김기영[215]네이버콘텐츠통계서비스소개 김기영
[215]네이버콘텐츠통계서비스소개 김기영NAVER D2
 
Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리Jeong-gyu Kim
 
Azure Database for MySQL
Azure Database for MySQLAzure Database for MySQL
Azure Database for MySQLrockplace
 
AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기I Goo Lee
 

What's hot (20)

2.apache spark 실습
2.apache spark 실습2.apache spark 실습
2.apache spark 실습
 
SQL Server to Azure SQL Database Migration
SQL Server to Azure SQL Database MigrationSQL Server to Azure SQL Database Migration
SQL Server to Azure SQL Database Migration
 
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
 
대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴
대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴
대용량 분산 아키텍쳐 설계 #2 대용량 분산 시스템 아키텍쳐 디자인 패턴
 
Optane DC Persistent Memory(DCPMM) 성능 테스트
Optane DC Persistent Memory(DCPMM) 성능 테스트Optane DC Persistent Memory(DCPMM) 성능 테스트
Optane DC Persistent Memory(DCPMM) 성능 테스트
 
0222 사내세미나_오정민 스프링인액션
0222 사내세미나_오정민 스프링인액션0222 사내세미나_오정민 스프링인액션
0222 사내세미나_오정민 스프링인액션
 
Cloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcampCloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcamp
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
 
AWS Aurora 운영사례 (by 배은미)
AWS Aurora 운영사례 (by 배은미)AWS Aurora 운영사례 (by 배은미)
AWS Aurora 운영사례 (by 배은미)
 
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
Ndc2011 성능 향상을_위한_데이터베이스_아키텍쳐_구축_및_개발_가이드
 
Amazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB DayAmazon Aurora Deep Dive (김기완) - AWS DB Day
Amazon Aurora Deep Dive (김기완) - AWS DB Day
 
Azure databases for PostgreSQL, MySQL and MariaDB
Azure databases for PostgreSQL, MySQL and MariaDB Azure databases for PostgreSQL, MySQL and MariaDB
Azure databases for PostgreSQL, MySQL and MariaDB
 
Kafka 자료 v0.1
Kafka 자료 v0.1Kafka 자료 v0.1
Kafka 자료 v0.1
 
Apache Kylin
Apache KylinApache Kylin
Apache Kylin
 
안정적인 서비스 운영 2013.08
안정적인 서비스 운영   2013.08안정적인 서비스 운영   2013.08
안정적인 서비스 운영 2013.08
 
[215]네이버콘텐츠통계서비스소개 김기영
[215]네이버콘텐츠통계서비스소개 김기영[215]네이버콘텐츠통계서비스소개 김기영
[215]네이버콘텐츠통계서비스소개 김기영
 
Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리Spark로 알아보는 빅데이터 처리
Spark로 알아보는 빅데이터 처리
 
Azure Database for MySQL
Azure Database for MySQLAzure Database for MySQL
Azure Database for MySQL
 
AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기
 

Viewers also liked

Tdc2013 선배들에게 배우는 server scalability
Tdc2013 선배들에게 배우는 server scalabilityTdc2013 선배들에게 배우는 server scalability
Tdc2013 선배들에게 배우는 server scalability흥배 최
 
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도Amazon Web Services Korea
 
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMats Kindahl
 
[제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE
[제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE  [제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE
[제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE 흥래 김
 
H3 2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수
H3  2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수H3  2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수
H3 2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수KTH, 케이티하이텔
 
Concurreny programming
Concurreny programmingConcurreny programming
Concurreny programmingJaejin Yun
 
Stl vector, list, map
Stl vector, list, mapStl vector, list, map
Stl vector, list, mapNam Hyeonuk
 
세상과 통하는 디자인 만들기 강연 자료
세상과 통하는 디자인 만들기 강연 자료세상과 통하는 디자인 만들기 강연 자료
세상과 통하는 디자인 만들기 강연 자료미선 윤
 
[C++adv] STL 사용법과 주의 사항
[C++adv] STL 사용법과 주의 사항[C++adv] STL 사용법과 주의 사항
[C++adv] STL 사용법과 주의 사항MinGeun Park
 
[1216 박민근] 게임회사취업및이직에관한조언
[1216 박민근] 게임회사취업및이직에관한조언[1216 박민근] 게임회사취업및이직에관한조언
[1216 박민근] 게임회사취업및이직에관한조언MinGeun Park
 
Workshop: Introduction to the Disruptor
Workshop: Introduction to the DisruptorWorkshop: Introduction to the Disruptor
Workshop: Introduction to the DisruptorTrisha Gee
 
[KGC 2011]Boost 라이브러리와 C++11
[KGC 2011]Boost 라이브러리와 C++11[KGC 2011]Boost 라이브러리와 C++11
[KGC 2011]Boost 라이브러리와 C++11흥배 최
 
Fault tolerance 1장
Fault tolerance 1장Fault tolerance 1장
Fault tolerance 1장eva
 
Introduction to the Disruptor
Introduction to the DisruptorIntroduction to the Disruptor
Introduction to the DisruptorTrisha Gee
 
Up cycling ppt_JINHANSOL
Up cycling ppt_JINHANSOLUp cycling ppt_JINHANSOL
Up cycling ppt_JINHANSOLJin Hansol
 
모바일 메신저 아키텍쳐 소개
모바일 메신저 아키텍쳐 소개모바일 메신저 아키텍쳐 소개
모바일 메신저 아키텍쳐 소개Hyogi Jung
 

Viewers also liked (20)

Tdc2013 선배들에게 배우는 server scalability
Tdc2013 선배들에게 배우는 server scalabilityTdc2013 선배들에게 배우는 server scalability
Tdc2013 선배들에게 배우는 server scalability
 
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
AWS re:Invent re:Cap - 새로운 관계형 데이터베이스 엔진: Amazon Aurora - 양승도
 
Sybase To Oracle Migration for Developers
Sybase To Oracle Migration for DevelopersSybase To Oracle Migration for Developers
Sybase To Oracle Migration for Developers
 
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
 
[제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE
[제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE  [제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE
[제14회 JCO 컨퍼런스] 개발자를 위한 서버이중화 by JAVACAFE
 
H3 2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수
H3  2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수H3  2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수
H3 2011 하이브리드 앱 아키텍쳐 및 개발방법_아임IN Lab팀_장동수
 
KEOPS EXPOSITIONS/ PRESSE
KEOPS EXPOSITIONS/ PRESSEKEOPS EXPOSITIONS/ PRESSE
KEOPS EXPOSITIONS/ PRESSE
 
Concurreny programming
Concurreny programmingConcurreny programming
Concurreny programming
 
Stl vector, list, map
Stl vector, list, mapStl vector, list, map
Stl vector, list, map
 
세상과 통하는 디자인 만들기 강연 자료
세상과 통하는 디자인 만들기 강연 자료세상과 통하는 디자인 만들기 강연 자료
세상과 통하는 디자인 만들기 강연 자료
 
[C++adv] STL 사용법과 주의 사항
[C++adv] STL 사용법과 주의 사항[C++adv] STL 사용법과 주의 사항
[C++adv] STL 사용법과 주의 사항
 
C++ stl
C++ stlC++ stl
C++ stl
 
[1216 박민근] 게임회사취업및이직에관한조언
[1216 박민근] 게임회사취업및이직에관한조언[1216 박민근] 게임회사취업및이직에관한조언
[1216 박민근] 게임회사취업및이직에관한조언
 
Workshop: Introduction to the Disruptor
Workshop: Introduction to the DisruptorWorkshop: Introduction to the Disruptor
Workshop: Introduction to the Disruptor
 
[KGC 2011]Boost 라이브러리와 C++11
[KGC 2011]Boost 라이브러리와 C++11[KGC 2011]Boost 라이브러리와 C++11
[KGC 2011]Boost 라이브러리와 C++11
 
Fault tolerance 1장
Fault tolerance 1장Fault tolerance 1장
Fault tolerance 1장
 
Introduction to the Disruptor
Introduction to the DisruptorIntroduction to the Disruptor
Introduction to the Disruptor
 
PCF Architecture
PCF Architecture PCF Architecture
PCF Architecture
 
Up cycling ppt_JINHANSOL
Up cycling ppt_JINHANSOLUp cycling ppt_JINHANSOL
Up cycling ppt_JINHANSOL
 
모바일 메신저 아키텍쳐 소개
모바일 메신저 아키텍쳐 소개모바일 메신저 아키텍쳐 소개
모바일 메신저 아키텍쳐 소개
 

Similar to Scalable web architecture

오픈소스 성능 최적화 보고서 ch07. Infinispan
오픈소스 성능 최적화 보고서 ch07. Infinispan오픈소스 성능 최적화 보고서 ch07. Infinispan
오픈소스 성능 최적화 보고서 ch07. InfinispanHyeonSeok Choi
 
Cloud migration pattern using microservices
Cloud migration pattern using microservicesCloud migration pattern using microservices
Cloud migration pattern using microservicesSeong-Bok Lee
 
Introduction to scalability
Introduction to scalabilityIntroduction to scalability
Introduction to scalabilitypolabear
 
개발자 지향 WAS : IBM WebSphere Liberty Server
개발자 지향 WAS : IBM WebSphere Liberty Server개발자 지향 WAS : IBM WebSphere Liberty Server
개발자 지향 WAS : IBM WebSphere Liberty ServerJungWoon Lee
 
Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)
Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)
Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)Kyunghun Jeon
 
SteelEye 표준 제안서
SteelEye 표준 제안서SteelEye 표준 제안서
SteelEye 표준 제안서Yong-uk Choe
 
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항rockplace
 
4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴Terry Cho
 
(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례
(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례
(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례Jeongsang Baek
 
Umc.Core Frameworks
Umc.Core FrameworksUmc.Core Frameworks
Umc.Core Frameworks준일 엄
 
1711 azure-live
1711 azure-live1711 azure-live
1711 azure-live세준 김
 
designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...uEngine Solutions
 
Pg day seoul 2016 session_02_v1.0_ff
Pg day seoul 2016 session_02_v1.0_ffPg day seoul 2016 session_02_v1.0_ff
Pg day seoul 2016 session_02_v1.0_ffPgDay.Seoul
 
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1Ji-Woong Choi
 
서버학개론(백엔드 서버 개발자를 위한)
서버학개론(백엔드 서버 개발자를 위한)서버학개론(백엔드 서버 개발자를 위한)
서버학개론(백엔드 서버 개발자를 위한)수보 김
 
클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버
클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버
클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버JungWoon Lee
 
요즘 웹 배포
요즘 웹 배포요즘 웹 배포
요즘 웹 배포명호 박
 
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20Amazon Web Services Korea
 

Similar to Scalable web architecture (20)

오픈소스 성능 최적화 보고서 ch07. Infinispan
오픈소스 성능 최적화 보고서 ch07. Infinispan오픈소스 성능 최적화 보고서 ch07. Infinispan
오픈소스 성능 최적화 보고서 ch07. Infinispan
 
Cloud migration pattern using microservices
Cloud migration pattern using microservicesCloud migration pattern using microservices
Cloud migration pattern using microservices
 
Introduction to scalability
Introduction to scalabilityIntroduction to scalability
Introduction to scalability
 
개발자 지향 WAS : IBM WebSphere Liberty Server
개발자 지향 WAS : IBM WebSphere Liberty Server개발자 지향 WAS : IBM WebSphere Liberty Server
개발자 지향 WAS : IBM WebSphere Liberty Server
 
Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)
Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)
Backend Master | 1.1 Enhancing performance - Scalability (Scale UP & OUT)
 
Lena Application Server
Lena  Application ServerLena  Application Server
Lena Application Server
 
steeleye Replication
steeleye Replication steeleye Replication
steeleye Replication
 
SteelEye 표준 제안서
SteelEye 표준 제안서SteelEye 표준 제안서
SteelEye 표준 제안서
 
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
 
4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴
 
(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례
(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례
(GameTech2015) Live Operation by Adbrix의 Node.js와 MongoDB를 이용한 멀티테넌트 인프라 구축사례
 
Umc.Core Frameworks
Umc.Core FrameworksUmc.Core Frameworks
Umc.Core Frameworks
 
1711 azure-live
1711 azure-live1711 azure-live
1711 azure-live
 
designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...
 
Pg day seoul 2016 session_02_v1.0_ff
Pg day seoul 2016 session_02_v1.0_ffPg day seoul 2016 session_02_v1.0_ff
Pg day seoul 2016 session_02_v1.0_ff
 
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
 
서버학개론(백엔드 서버 개발자를 위한)
서버학개론(백엔드 서버 개발자를 위한)서버학개론(백엔드 서버 개발자를 위한)
서버학개론(백엔드 서버 개발자를 위한)
 
클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버
클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버
클라우드와 마이크로 서비스를 위한 새로운 시대의 경량화 WAS - IBM WAS Liberty 서버
 
요즘 웹 배포
요즘 웹 배포요즘 웹 배포
요즘 웹 배포
 
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
 

More from Steve Min

Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)Steve Min
 
Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Steve Min
 
Apache Htrace overview (20160520)
Apache Htrace overview (20160520)Apache Htrace overview (20160520)
Apache Htrace overview (20160520)Steve Min
 
[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)Steve Min
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)Steve Min
 
[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)Steve Min
 
Google guava overview
Google guava overviewGoogle guava overview
Google guava overviewSteve Min
 
Scala overview
Scala overviewScala overview
Scala overviewSteve Min
 
NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database OverviewSteve Min
 
NoSQL Database
NoSQL DatabaseNoSQL Database
NoSQL DatabaseSteve Min
 
Scalable system design patterns
Scalable system design patternsScalable system design patterns
Scalable system design patternsSteve Min
 
Cloud Computing v1.0
Cloud Computing v1.0Cloud Computing v1.0
Cloud Computing v1.0Steve Min
 
Cloud Music v1.0
Cloud Music v1.0Cloud Music v1.0
Cloud Music v1.0Steve Min
 

More from Steve Min (14)

Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)
 
Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)
 
Apache Htrace overview (20160520)
Apache Htrace overview (20160520)Apache Htrace overview (20160520)
Apache Htrace overview (20160520)
 
[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)
 
[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)
 
Google guava overview
Google guava overviewGoogle guava overview
Google guava overview
 
Scala overview
Scala overviewScala overview
Scala overview
 
NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database Overview
 
NoSQL Database
NoSQL DatabaseNoSQL Database
NoSQL Database
 
Scalable system design patterns
Scalable system design patternsScalable system design patterns
Scalable system design patterns
 
Cloud Computing v1.0
Cloud Computing v1.0Cloud Computing v1.0
Cloud Computing v1.0
 
Cloud Music v1.0
Cloud Music v1.0Cloud Music v1.0
Cloud Music v1.0
 
Html5 video
Html5 videoHtml5 video
Html5 video
 

Scalable web architecture

  • 1. Scalable Web Architecture 2010.12. DM본부 기술개발담당 1
  • 2. index 1. Desirable Properties of a Web App 2. Reference Architecture 1. Flickr Architecture 2. LiveJournal Architecture 3. Facebook Architecture 3. Build Scalable Architecture Process 1. Step 1 - One Server 2. Step 2 - One Server - Vertical Scaling 3. Step 3 - Two Server - Vertical Partitioning (Services) 4. Step 4 - Horizontal Scaling (App Server) 5. Step 5 - Vertical Partitioning (Hardware) 6. Step 6 - Horizontal Scaling (DB Scaling) 7. Step 7 - Vertical / Horizontal Partitioning (DB) 8. Step 8 - Seperating Sets (Federation) 4. 엠넷은? 2
  • 3. Desirable Properties of a Web App •확장성(Scalability) •고가용성(High Availability) •성능(Performance) •응답성(Responsiveness) •관리성(Manageability) •저비용(Low Cost) 3
  • 4. High Availability 고가용성(HA)이란 바람직한 정도로 긴 시간동안 지속적으로 운영이 가 능한 시스템이나 컴포넌트를 가리킨다. 가용성이란 흔히 "100% 가용" 등과 같이 상대적으로 측정되거나 또는 " 절대 고장나지 않음" 등과 같이 표현될 수 있다. 널리 쓰이고 있지만 달성하기 결코 쉽지 않은 시스템 및 제품에 대한 가 용성 표준에 흔히 “파이브 나인(five 9)이라고 부르는 99.999%의 가용성 을 들 수 있다. 4
  • 5. Architecture 아키텍처란, 프로세스와 전체적인 구조나 논리적 요소들 그리고 컴퓨터 와 운영체계, 네트웍 및 기타 다른 개념들 간의 논리적 상호관계 등을 생 각해내고 정의하는 등, 모든 곳에 적용되는 용어이다. 5
  • 6. Scalability 확장성(Scalability )은 컴퓨터 애플리케이션이나 제품 (하드웨어나 소프 트웨어)이, 사용자의 요구에 맞추기 위해 크기나 용량을 변경해도, 그 기 능이 계속하여 잘 동작할 수 있는 능력을 말한다. 크기 변화는 대체로 크 기나 용량 면에서 더 커지는 쪽으로 이루어진다. 확장성이 아닌 것: •스피드나 성능(2GHz vs. 3GHz) •운영체제(솔라리스 vs. 리눅스) •소프트웨어 기술(Java vs. Python) •하드웨어 플랫폼(AMD vs. Intel) •스토리지 기술(SAN vs. NAS) 6
  • 7. Vertical vs. Horizontal Scale Up Scale Out 7
  • 8. Shared Nothing Architecture 정의 “ A shared nothing architecture (SN) is a distributed computing architecture in which each node is independent and self-sufficient, and there is no single point of contention across the system. “ - Wikipedia PHP 창시자인 라스머스 레도르프(Rasmus Lerdorf)가 스케일링의 핵심원리 로 설명 어떤 하드웨어나 소프트웨어 리소스도 공유하지 않는 구조 서비스를 구성하는 리소스를 서버와 함께 분리함 으로서 개개의 서버의 failure로부터 격리하고 높은 scalability를 얻는 구조 쉬운 스케일 아웃 8
  • 9. Reference Architecture - Flickr Architecture 9
  • 10. Reference Architecture - LiveJournal Architecture 10
  • 11. Reference Architecture - Facebook Architecture 11
  • 12. Reference Architecture - Facebook Web Architecture 3 service tiers: Web/Apache Memcached MySQL Uses: Linux PHP
  • 13. Build Scalable Architecture Process 문제 발견 Identify Scalability Bottlenecks Identify SPOFs and Availability Issues Identify Downtime Impact Risk Zones 해결방안 적용 Vertical Scaling Vertical Partitioning Horizontal Scaling Horizontal Partitioning 프로세스 반복
  • 14. Step 1 - One Server 14
  • 15. Step 2 - One Server - Vertical Scaling 개요 노드 수를 바꾸지 않고, 하드웨어 리소스를 증가 / 변경 장점 • 구조가 단순 • 구현이 쉽다 단점 • 하드웨어 증설에 한계 • 증설을 위한 다운시간이 필요함 • 비용이 지수적으로 증가함 • SPOF(Single Point of Failure) 15
  • 16. Step 3 - Two Server - Vertical Partitioning (Services) 개요 분리된 노드에서 각 서비스를 운영함 장점 • 어플리케이션당 가용성이 증가함 • 태스크 기반에 특화/최적화/튜닝이 가능해 짐 • Context Switching이 줄어듦 • 유연성이 증가됨 단점 • 전체 가용성이 증가하지 않음 • 사이트가 다시 느려짐 • 확장성에 한계 • 쉽게 웹노드 CPU 한계치에 도달함 • Two SPOF(Single Point of Failure) 16
  • 17. Vertical Partioning 이해 Vertical Partioning 이란  태스크와 기능을 분산시켜 노드수를 늘리는 것  각 노드 (혹은 클러스터)는 다른 태스크를 수행함 Vertical Partioning은 다양한 레이어에서 수행이 가능함  어플리케이션  서버  데이터  하드웨어 등 17
  • 18. Step 4 - Horizontal Scaling (App Server) 개요 로드밸런싱을 통해 웹서버의 노드의 숫자를 늘림 장점 • 웹서버의 가용성이 증가됨 • 앱의 요건에 큰 변경이 없음 • 유연성이 증가됨 단점 • 사이트가 병목현상 존재 • IO 병목 • Database 병목 • SPOF(Single Point of Failure) • Database • Public Web Node 18
  • 19. Horizontal Scaling 이해 Horizontal Scaling 이란  노드 복제를 통해 노드 수를 증가시킴  각 노드 (혹은 클러스터)는 동일한 태스크를 수행함  각 노드는 동일함  특별한 노드의 모음을 클러스터라고 칭함 Horizontal Scaling은 임의의 노드유형에서 수행이 가능함  웹서버(어플리케이션서버)  캐시 서버  DB 서버 19
  • 20. Load Balancer - Removing SPOF Active-Standby LB Load Balanced App Server Cluster에서는 로드밸런서가 SPOF Setup LB in Active-Active or Active-Passive mode • Note: Active-Active nevertheless assumes that each LB is independently able to take up Active-Active LB the load of the other • If one wants ZERO downtime, then Active-Active becomes truly cost beneficial only if multiple LBs (more than 3 to 4) are daisy chained as Active- Active forming an LB Cluster 20
  • 21. Step 5 - Vertical Partitioning (Hardware) 개요 파일시스템을 외부 스토리지로 분리 (Partitioning) 장점 • DB서버의 스케일 업 가능 • DB서버의 퍼포먼스가 향상됨 단점 • 비용증가 (SAN) 21
  • 22. Caching 연산결과를 저장하여 다음 번 요청에 결과를 재활용 캐싱은 퍼포펀스를 향상시킬 수 있음 Can't hit the DB all the time MyISAM: r/w concurrency problems InnoDB: better; not perfect MySQL has to parse your queries all the time Cache hit-ratios Caching Methods Generate Static Pages Cache full pages Cache partial pages Cache data Caching Patterns Write-through Write-behind(Write-back) Sideline cache 22
  • 23. Write-through cache App Server ① ③ Cache ② Database 23
  • 24. Write-back cache App Server ① ② Cache ③ Database 24
  • 25. Sideline cache App Server Cache ① ② Database 25
  • 26. Step 6 - Horizontal Scaling (DB Scaling) 개요 DB서버의 노드를 증가시킴 옵션 • Shared nothing Cluster • Real Application Cluster (or Shared Storage Cluster) 장점 • 웹서버가 늘어남에따라 DB서버 노드도 추가 할 수 있다 • DB서버가 더 이상 SPOF가 아니다 단점 • 증가에 한계가 있다 26
  • 27. Shared Nothing Cluster 각 DB서버 노드가 완전한 Database copy 를 가지고 있 는것 각 DB서버 노드간에는 아무 것도 공유되지 않음 DB Replication을 통해 완성 됨 27
  • 30. Tree Replication (Relay slave replication) 30
  • 32. Buddy Replication(Circular Replication) Node B Data B Backup A Replication Replication Node A Node C Data A Data C Backup E Backup B Replication Replication Node E Replication Node D Data E Data D Backup D Backup C 32
  • 33. Buddy Replication(Circular Replication) Node B Data B+A Backup E Replication Node A Node C Data A Replication Data C Backup E Backup B+A Replication Node E Replication Node D Data E Data D Backup D Backup C 33
  • 34. Replication Scaling - Reads Reading scales well with replication Great for (mostly) read-only applications One server Two server reads reads reads writes writes writes 34
  • 35. Replication Scaling - Writes Writing doesn’t scale with replication All servers needs to do the same writes reads reads reads reads reads writes writes writes writes writes 35
  • 36. Step 7 - Vertical / Horizontal Partitioning (DB, Sharding) 개요 데이터를 분할하여 DB 클러스터 수를 늘림 Load Balanced 옵션 App Servers • Vertical Partitioning – 테이블/컬럼 분리 • Horizontal Partitioning – rows에 의한 분리 DB Cluster DB Cluster 36
  • 37. Vertical Partitioning (DB) 일련의 테이블을 다른 DB로 옮긴다. 예) 소셜네트워크 – 사용자테이블과 진구테 이블은 분리된 DB Cluster에 저장한다 각 DB 클러스터는 다른 테이블을 갖는다. App Cluster Application code or DAO / Driver code or a proxy는 어떤 DB로 쿼리 할지 알고 있다 .  컬럼 단위로 분리해서 별도 DB로 나눌 수 있다. DB Cluster 1 DB Cluster 2 Table 1 Table 3 Table 2 Table 4 단점 One cannot perform SQL joins or maintain referential integrity (referential integrity is as such over-rated) Finite Limit 37
  • 38. Horizontal Partitioning (DB) 레코드집합을 다른 DB로 옮긴다. 예) 소셜네트워크 – 각 DB Cluster 는 백만 사용자에 대한 모든 데이터를 포함시킴 각 DB클러스터는 동일한 테이블을 갖는다. App Cluster Application code or DAO / Driver code or a proxy는 주어진 row에 대해 어느 DB로 쿼리 할지 알고 있다. 단점 DB Cluster 1 DB Cluster 2 SQL unions for search type queries Table 1 Table 1 must be performed within code Table 2 Table 2 Table 3 Table 3 Table 4 Table 4 1 million users 1 million users 38
  • 39. Step 8 - Seperating Sets (Federation) 글로벌 서비스 제공 시 활용 Global Redirector DNS를 통한 글로벌 라우팅 App App 장점 Servers Servers 무제한 확장이 가능함 Cluster Cluster 단점 데이터의 통합이 복잡해짐 DB Cluster DB Cluster Set내의 사이징 조절이 필요 Global App settings은 Set간 DB Cluster DB Cluster replication이 필요함 SET 1 SET 2 39
  • 40. 엠넷은? ? 40