Mais conteúdo relacionado Semelhante a AWS 기반 지속 가능한 데이터 분석 플랫폼 구축하기 - 박윤곤, 아이스크림에듀 :: AWS Summit Seoul 2019 (20) Mais de Amazon Web Services Korea (20) AWS 기반 지속 가능한 데이터 분석 플랫폼 구축하기 - 박윤곤, 아이스크림에듀 :: AWS Summit Seoul 20191. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS 기반 지속 가능한 데이터
분석 플랫폼 구축하기
박윤곤
아이스크림에듀
2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
발표자 소개
아이스크림에듀 지능정보기술연구소 (2018~)
• 학습분석 시스템 인프라 구축을 담당하고 있습니다.
• Python을 주로 사용합니다.
github.com/rubysoho07
3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
이야기 할 것들
홈런 + 학습 분석
시스템 구축 중 겪은 이슈
마무리
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
‘아이스크림 홈런’을 소개합니다.
6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
학생들의 학습 수행률은 어떠한가요?
어떤 패턴으로 학습을 진행하나요?
출석은 잘 하고 있나요?
학습 외의 활동에도 잘 참여하나요?
문제는 어떤 순서로 풀고 있나요?
문제를 맞췄지만, 혹시 찍은 건 아닌가요?
(그 외 많은 질문들…)
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
이런 질문에 대답하기 위해…
8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
시스템 구성
Kinesis GlueLambda
(데이터 가져오기
및 변환)
Redshift
Amazon Aurora
(메타데이터 DB)
AWS Cloud
API Gateway
홈런 학습기
S3
(데이터
레이크)
9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Kinesis
Data Firehose
AWS Glue AWS Lambda
2018년 5월
서울 리전에서
사용 가능
2018년 6월
서울 리전에서
사용 가능
2018년 10월
최대 제한 시간
15분으로 변경
11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다시 시스템 구성으로 돌아가서…
Kinesis GlueLambda Redshift
Amazon Aurora
AWS Cloud
API Gateway
홈런 학습기
S3
14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda + RDS: 동시성과 Max Connection
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda + RDS: 동시성과 Max Connection
• 확인해야 하는 것들
• (최대) 함수 호출 빈도
• (최대) 함수 실행에 걸리는 시간
• 현재 사용 중인 DB의 최대 연결 개수
• (참고) Aurora MySQL 종류 별 MAX_CONNECTIONS
• CloudWatch에서 ConcurrentExecutions 지표
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda + RDS: 동시성과 Max Connection
• 앞에서 찾은 값으로 필요한 동시성을 미리 예약합니다.
• 동시 실행 = (초 당 호출 수) * (함수 실행 시간(초))
• 계산한 동시 실행보다는 조금 더 여유 있게, 최대 연결 개수를 초과하지 않게 설정
• 함수 호출이 예약된 동시성을 초과하면, Throttling이 발생합니다.
17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
(초당 5회) * 60(초) * 60(분) * (Kinesis Stream 샤드 개수)
19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
5 * 60 * 60 * 10 = 180,000 (회)
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
180,000 * 30 = 5,400,000 회 호출 발생
24.30 $
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
24.30 $ * (분류하고 싶은 유형) = ??? $
22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
작은 파일로 나눠서 저장
데이터 가공이나 조회에 많은 시간이 걸릴 수 있음
23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis + Lambda + S3: 왜 비용이 많이 나왔지?
파일을 합쳐서 저장하거나,
Kinesis Firehose를 검토합시다.
24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Glue: ETL 작업에서 간과하기 쉬운 것들
25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Glue: ETL 작업에서 간과하기 쉬운 것들
26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Glue: ETL 작업에서 간과하기 쉬운 것들
27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: 적절한 Computing Node 개수 찾기
28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: 적절한 Computing Node 개수 찾기
• 데이터 저장에 어느 정도의 용량이 필요할까요?
• Computing Node 당 용량
Dense Compute(DC) Dense Storage(DS)
dc2.large: 160GB (SSD) ds2.xlarge: 2TB (HDD)
dc2.8xlarge: 2.56TB (SSD) ds2.8xlarge: 16TB (HDD)
29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: 적절한 Computing Node 개수 찾기
• 데이터 분석을 얼마 만에 수행해야 하나요?
• 적절한 노드 개수를 직접 찾아보기 vs. Elastic Resize
• 데이터 분석을 위해 사용할 수 있는 기능에는 무엇이 있을까요?
• 15분 내: Lambda
• 15분 이상: ECS, EKS, EC2, …
• Lambda + Step Functions
30. S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
{
“actor”: {
“id”: “http://example.org/person/123”,
“name”: “Test”,
“type”: “Person”
},
“action”: “LoggedIn”,
“object”: {
…
}
}
31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
X
(참고자료)
35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
가능하지만,
굳이 추천해 드리고 싶지는 않습니다.
(참고자료)
37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
(Flattening JSON을 검색해 봅시다)
Glue의 ETL 작업
39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Redshift: JSON 안에 또 JSON Object…
40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
작은 규모로 먼저 시작하세요!
그리고 조금씩 규모를 키워 봅시다
42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
수집할 데이터와 속성은
구성원 모두와 함께 결정합시다
43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
앞으로 여러 문제를 함께 헤쳐 나갈
개발자를 모시고 있습니다
hahafree12@gmail.com