Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Improving Adserver
Search
Buzzvil
April 21, 2021
Programming
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Improving Adserver
By Claud
Buzzvil
April 21, 2021
More Decks by Buzzvil
See All by Buzzvil
220903_GFS
buzzvil
0
740
Git 해부하기 2 + 3
buzzvil
0
82
Metastable Failure
buzzvil
0
440
Git 해부하기
buzzvil
0
110
Introduction to Plate Solving
buzzvil
0
99
Airbnb Minerva
buzzvil
0
630
Shape up 방법론
buzzvil
0
1.2k
Buzzvil Billing Data Pipeline
buzzvil
0
790
Journey of Dash's release-cycle
buzzvil
0
340
Other Decks in Programming
See All in Programming
Event is what happens
moro
2
3.8k
Moscow Python Meetup №112. Как поселить ИИ агентов в event driven архитектуре
moscowdjango
PRO
0
110
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
230
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
protojson における文字化けの扱い
kazuki1023
0
150
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
160
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.2k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.7k
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
260
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
540
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.2k
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.5k
Marketing to machines
jonoalderson
1
6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Un-Boring Meetings
codingconduct
0
490
Docker and Python
trallard
47
4.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Transcript
Improving BuzzAd CI Claud Choi @ Buzzvil 2021-04-21
buzzad의 악명
Why? Slowest tests in BuzzAd
Buzzad test
History
모든 것의 시작 Let’s integrate codecov into buzzad
Drone migration • AS-IS ◦ Node / Python lint, Python
test → Jenkins CI ◦ Python type check / formatting → Drone CI • TO-BE ◦ Only use Drone CI
Drone migration
First Codecov Report
After drone migration • Seems going well
But.. • 버즈애드 테스트가 느려졌어요..
But.. • 간헐적으로 ci 느려지는 현상 발생 • 리소스 문제로
인한 일시적인 현상으로 생각함
None
None
문제 인식 • CI가 너무 느려서 생산성에 영향을 주고 있다
• 속도를 개선할 수 있는 방법?
Distributed testing • pytest-xdist ◦ 여러 프로세스에서 TC를 병렬적으로 수행
◦ 리소스 vs 수행 시간
Problems • We have dependencies ◦ Do we need databases
per worker?
Problems • We have dependencies ◦ Do we need databases
per worker? ◦ No we just need table/indices per worker table pytest gw1_table w1 gw2_table w2 gw3_table w3
Problems • We have dependencies ◦ Do we need databases
per worker? ◦ No we just need table/indices per worker
Failing test cases • Unexpected external dependency ◦ 테스트 도중
생성된 file log를 test case에서 사용하고 있음 ◦ Click log가 json file에 잘 남는지 확인하는 테스트
Failing test cases
Failing test cases • Fragile test cases ◦ Autoincrement id를
특정 값으로 가정하여 테스트케이스를 작성한 경우 ◦ 존재하지 않는 데이터의 id만 사용하는 경우 ▪ e.g. 실제 unit 생성 없이 unit_id=1만 사용
Finally
But..
Problems • Flaky builds ◦ 같은 테스트라도 간헐적으로 실패하는 경우가
발생함 ◦ Dependent service에 대한 요청 실패로 발생 • Performance degradation ◦ 갑자기 CI 수행시간이 매우 길어지거나 아예 동작하지 않는 경우가 발생함 ◦ 동시에 수행되고 있는 CI 워크로드가 많은 경우에 발생
DynamoDB timeout • 간헐적으로 local dynamodb로 보내는 요청이 timeout되어 테스트가
실패함 • 테스트 시 dynamodb 요청이 실패하면 retry하도록 하여 해결 ◦ pytest-xdist로 인해 ddb 서비스에 동시에 많은 요청이 들어오는 경우 throttle되는 이슈로 생각됨
Elasticsearch timeout • 간헐적으로 elasticsearch로 보내는 요청이 timeout되어 테스트가 실패함
• ddb의 케이스를 참고하여 retry하도록 하여 해결
Performance degradation • Why?
• Drone server ◦ Receive webhook from github ◦ Send
status to github • Drone runner ◦ Poll server for pipelines to execute ◦ Execute workloads Drone CI Drone server Drone runner Webhook Status Result Poll Run workloads k8s-screen
Drone kubernetes runner • Drone pipeline이 하나의 pod이 대응되고 step별로
container가 생성됨 ◦ Note: A pod is the smallest execution unit in Kubernetes Pipeline step step step step Pod container container container container
Drone jobs not scheduled properly
Kubernetes pod scheduling • 클러스터에서 pod이 필요로 하는 리소스가 충분한
노드에 스케줄링됨 • Resource request/limit ◦ request: pod 생성 시 필요로 하는 리소스 ◦ limit: pod이 최대로 사용할 수있는 리소스. 넘어가면 throttle되거나 OOMKilled Node requests: memory: 1Gi / 4Gi Node requests: memory: 3.5Gi / 4Gi Pod requests: memory: 1Gi limits: memory: 2Gi
Cluster autoscaler not working • Drone이 올라가 있는 클러스터의 autoscaler가
동작하지 않았음 ◦ cluster autoscaling: 필요한 리소스에 따라 워커 노드의 수를 자동으로 조절함 • Drone job이 여러 개 도는 경우 리소스 부족으로 스케줄링 안됨
Drone resource request
Drone resource request • Step에 정의한 resource request 가 동작하지
않는 것 확인 ◦ request가 항상 1로 생성됨 ◦ 일부 노드에 heavy한 job이 계속해서 스케줄링 되는 현상 발생
Culprit • Drone에서 step 단위의 resource request가 사라지고 pipeline 단위로만
설정할 수 있도록 변경됨..
Finally
Result • buzzad CI를 drone으로 migration • CI 수행 시간
4분 전후로 단축
Thank you