SlideShare a Scribd company logo
1 of 27
Download to read offline
@LinkedInEng | @mockitoguy
CI/CD at scale
Lessons from LinkedIn and Mockito
QCon, San Francisco, 11-2017
● Szczepan Faber @mockitoguy
● Born in Poland (we like our zzz’s)
In US since 2015
● Codes professionally since 2002
● Creator of mockito.org in 2007
● Core dev of gradle.org 1.x and 2.x in 2011-2015
● Tech Lead at LinkedIn Dev Tools since 2015
http://bit.do/li-tools
● Author on LinkedIn: http://bit.do/mockitoguy
● How to build great code review culture? http://bit.do/li-code-review
● Want to write great tests?
My workshop at QCon on Thursday:
http://bit.do/qcon-testing
● Want to innovate and push CD in Open Source?
Join shipkit.org
New project used by Mockito!
@LinkedInEng | @mockitoguy
Imagine
productivity
without the release overhead
@LinkedInEng | @mockitoguy
2. CD in OSS Mockito
(@MockitoJava)
● I created mocking framework
Mockito in 2007
● The team adopted CD in 2014
● We ship every pull request to
production to estimated 2M
users
Get ready to be excited about CD!
Development Tools
● Build tools, Gradle, CI
● Code review, IDEs
● and more!
● I’m an architect, tech lead, engineer working on development tools at
LinkedIn since 2015.
1. CD at LinkedIn (@LinkedInEng)
● linkedin.com adopted CD in 2015, shipping 3x day to 500M users.
LinkedIn Engineering (3000+)
Foundation team (300+)
● Kudos to great engineers working at LinkedIn, linkedin.com and the
tools. I am a part of a team.
@LinkedInEng | @mockitoguy
CD at linkedin.com by the numbers
○ 1000 commits, 300 unique committers across 4 main codebases
○ Web app, API server app, Android app, iOS app
○ The stats exclude other codebases (libraries, downstream microservices)
○ LinkedIn does not use (nor wants or needs) mono-repo. We currently have 7000+ codebases.
● Last quarter (Q3 ‘17):
○ 300 pushes to production (web app + api server)
○ 21 mobile app pushes (android + iOS, excluding Beta)
● LinkedIn engineering is more than linkedin.com
○ Other products exercise CD as well but don’t have such big codebase or number of committers
○ linkedin.com (flagship) is very progressive and paves the way for other LinkedIn software products
● Last week (5-11 Nov ‘17)
Part 1.
CD is hard
What do we do if something is hard?
@LinkedInEng | @mockitoguy
Why CD in linkedin.com?
● reduce the lead time to make positive business impact
○ ship features to production faster
● increase engineering productivity and happiness
○ avoid release overhead
■ avoid wasted time on stabilizing (bugfixing) the release branch.
Code should be always stable and ready to ship!
■ avoid wasted time on cherry-picking. Trunk based development.
○ avoid feature rush - last minute commit volume spike before the release
● improve quality
○ small incremental releases pose small risk and are easier to fix
○ avoid rollbacks and hotfixes. Instead we fix forward
The arguments apply to every software project!
In 2015 we launched 3x3 project - 3 releases per day, 3 hour max time commit-to-production.
Our goals:
@LinkedInEng | @mockitoguy
3x3 @LI
○ Because we want to iterate fast. Plus it helps with resilience because we can afford to miss a release
● Why 3 hours max time commit-to-production?
○ Because to ship 3 times a day, the commit-to-production pipeline needs speed
○ And it forces us to sort out our testing strategy (not enough time for manual or slow tests)
● In 2015 we completed mobile web and mobile apps
● In 2016 we completed desktop web
● Today we release linkedin.com several times a day
● LinkedIn Mobile apps are released every week, with 3 beta releases per week
(iOS Beta - once a week)
● Why 3 times per day?
@LinkedInEng | @mockitoguy
● Learning how to write great tests
- what to test, how to test, how to write code that is easy to test
● Flaky test is worse than no test
- detecting flaky tests automatically, overnight, using A/A testing
● Production grade tests and infrastructure
- in the past, tests and build code were not considered equally important as
production code
● Many existing tools, including OSS did not scale for CD
● Need for speed – testing in parallel and distributed
● Master branch always green
- Running all validations before code is merged to master
CD lessons @LI
@LinkedInEng | @mockitoguy
Current 3x3 stats for linkedin.com
Commits and
unique committers
in last week
Avg. time
commit-to-shippable in last
week
# of actual and target
releases in Q3 2017
(*) in actuality, it is higher because commits to libraries are not included
Web 317/115 150 min. 173/162
API 183/77 69 min. 123/162
iOS 164/69 165 min. 10/12
Android 241/72 72 min. 11/12
Combined 905*/333
@LinkedInEng | @mockitoguy
Opportunities @LI
● Increase discipline of fixing flaky tests
● Avoid redundant work in the pipeline
● For Android: simulator service, speed
● For iOS: Beta channel, Swift compiler stability and speed
● For Web app: browser cache
● For API server: avoid redundant work (Gradle Distributed Cache)
BTW. we use Play on Gradle for our API server: http://bit.do/play-on-gradle
● Minimize commit-to-shippable time
● Increase commit-to-shippable pipeline success rate (pipeline & tests stability)
● Hit the desired number of production releases
And many more! We keep improving the system!!!
@LinkedInEng | @mockitoguy
3x3 resources
LinkedIn Engineering Blog: http://bit.do/li-3x3
@LinkedInEng | @mockitoguy
Development Workflow @LI
● Multi-codebase architecture, 7000 codebases, 60% active
● Every codebase is governed by our “Multiproduct” framework
● Every Multiproduct has independent release cadence
● Every code change produces new version
● Trunk based development
● Mandatory code review (code owner must approve every change)
● Automation of commit-to-production pipeline
CD requires disciplined development workflow.
How software is developed at LinkedIn? (all our software, not only linkedin.com)
@LinkedInEng | @mockitoguy
Every codebase is a Multiproduct @LI
● One engineering culture
● Every engineer can contribute to any codebase
● Why matters? Easier to introduce CD into one culture
@LinkedInEng | @mockitoguy
Every change is a new version @LI
● And every new version can be shipped to production
● Why matters?
○ Makes it impossible to defer quality.
○ Clean code every day!
@LinkedInEng | @mockitoguy
Trunk based development @LI
● Incremental code changes, hiding incomplete features
● Feature toggles, “branch by abstraction” pattern
http://bit.do/branch-by-abstraction
● Why matters? Forces small, incremental changes. Avoids merge and
cherry-picking overhead.
● No long-lived feature branches
● All changes on main branch, which is always stable and ready to ship
@LinkedInEng | @mockitoguy
Mandatory code review @LI
● Somebody reads my code (and wants me to fix it)!
● Culture of feedback, learning and improving
http://bit.do/li-code-review
● Why matters? Clean, elegant code makes it easier to iterate
@LinkedInEng | @mockitoguy
Downstream dependency testing @LI
● Building code that depends on my code
● Strong signal in our CI pipeline
● Flaky tests are a problem to the entire ecosystem
● Why matters? avoiding regressions, catching integration problems early
@LinkedInEng | @mockitoguy
Automation of commit-to-production @LI
● The code I write or review goes to production within hours
● I am responsible for the quality
● Why it matters? Requires state of the art automated testing
○ BTW. I run a Java testing workshop on Thursday at QCon
http://bit.do/qcon-testing
@LinkedInEng | @mockitoguy
CI/CD pipeline @LI
For all our software, not only
components of linkedin.com
● Code change
● Code review (strong code ownership, owner must approve)
● Pre/post push validation (CI builds)
● Downstream dependency testing (test code that depend on me)
● New version ready!
● Staging
● Canary (deploy and test on single host)
○ Mobile uses Beta channel
● Ramp-up features (feature toggles)
○ Code push != feature push
● Remove feature toggle (dead code)
● Consumers that use wildcard versions pick up
new version in the next build.
● Consumers that use pinned version can be
updated automatically using “Push my
Upgrade” system.
● We can deprecate/end-of-life previous versions
Apps
Libraries
Dev workflow for all software at LinkedIn. Ready for part 2 (OSS)?
@mockitoguy
Part 2.
CD. in OSS
Mockito
Powered by shipkit.org
@mockitoguy
Open Source Mocking Framework for Java
● Mockito started in 2007
● 1.0 in 2008
● Hit mainstream in 2010
● Mostly manual releases...
Combined result puts Mockito on 3rd place!
@mockitoguy
2014 - Mockito adopts CD.
● Every merged pull request produces a new version and ships to public repo
● Scale: we estimate 2M users
● Prevent release procrastination (dreading to write release notes…)
@mockitoguy
Benefits of CD in OSS
● Productivity – zero release overhead
● Happy users – get features faster
● Faster debugging – quickly identify bad version (MTTR)
● Sustainability – release & stay alive
● No waste - no unreleased code
● Quality – self-enforced craftsmanship of every change
● Thriving, engaged community – contributions are released quickly
@mockitoguy
Community Feedback
● Quality anxiety
- you ship every pull request to production, are you shipping every bug, too?
- we ensure quality via immense battery of tests and rigorous code review
● What version of “mockito-core” to use?
- currently 244 versions in Maven Central
- use latest! We take compatibility VERY seriously. Sem ver!
● Dependency management cost
- worry that any version upgrade may bring incompatibilities to the dependency graph
- we get it. We strive to minimize Mockito dependencies. We understand that every
dependency is a liability to our customers
@mockitoguy
Mockito releases
By Shipkit
● Shipkit - toolkit for shipping
it for Java libraries
● Passionate about release
automation?
● http://shipkit.org
@LinkedInEng | @mockitoguy
Ready for CD?
● Imagine how fast you can ship changes that can create positive business impact
● Imagine unhindered productivity without the release overhead
● Imagine higher quality because smaller, incremental releases are a smaller risk
● Imagine that every code change is excellent, with clean code and great tests
● Imagine how reliable the commit-to-production pipeline is if it is battle tested daily
● At linkedin.com we land 1000 commits per week and ship to production several
times a day to 500M+ users.
● In the Open Source, Mockito library ships to production every pull request to
estimated 2M users
Now it is your turn! Questions?

More Related Content

What's hot

Trunk based development
Trunk based developmentTrunk based development
Trunk based developmentgo_oh
 
EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?Samsung Open Source Group
 
Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1Udi Bauman
 
IFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated TestingIFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated TestingDaniel Graversen
 
Agile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous IntegrationAgile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous IntegrationQuan Truong Anh
 
CommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - IntroductionCommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - Introductioncadorn
 
GDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaPeter Kofler
 
The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018Daniel Graversen
 
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDays Riga
 
How to Port a 9 Million Code Line Project to 64 bits?
How to Port a 9 Million Code Line Project to 64 bits? How to Port a 9 Million Code Line Project to 64 bits?
How to Port a 9 Million Code Line Project to 64 bits? PVS-Studio
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplateStanislav Petrov
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesAbhinav Gupta
 
Introduzione a React Native - Facebook Developer Circle Rome
Introduzione a React Native - Facebook Developer Circle RomeIntroduzione a React Native - Facebook Developer Circle Rome
Introduzione a React Native - Facebook Developer Circle RomeMatteo Manchi
 
vodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As codevodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As codevodQA
 
Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...
Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...
Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...OW2
 
Agile software architecture
Agile software architectureAgile software architecture
Agile software architectureScott Hsieh
 

What's hot (20)

Trunk based development
Trunk based developmentTrunk based development
Trunk based development
 
EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?EFL QA: Where Are We and Where Should We Go?
EFL QA: Where Are We and Where Should We Go?
 
Xp conf-tbd
Xp conf-tbdXp conf-tbd
Xp conf-tbd
 
Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1
 
IFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated TestingIFG for SAP Integration, webinar on Automated Testing
IFG for SAP Integration, webinar on Automated Testing
 
Agile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous IntegrationAgile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous Integration
 
CommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - IntroductionCommonJS via PINF JavaScript Loader - Introduction
CommonJS via PINF JavaScript Loader - Introduction
 
GDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran Canaria
 
TDD anche su iOS
TDD anche su iOSTDD anche su iOS
TDD anche su iOS
 
php-1701-a
php-1701-aphp-1701-a
php-1701-a
 
The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018
 
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
DevOpsDaysRiga 2018: Neil Crawford - Trunk based development, continuous depl...
 
How to Port a 9 Million Code Line Project to 64 bits?
How to Port a 9 Million Code Line Project to 64 bits? How to Port a 9 Million Code Line Project to 64 bits?
How to Port a 9 Million Code Line Project to 64 bits?
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
 
Introduzione a React Native - Facebook Developer Circle Rome
Introduzione a React Native - Facebook Developer Circle RomeIntroduzione a React Native - Facebook Developer Circle Rome
Introduzione a React Native - Facebook Developer Circle Rome
 
Gerrit Code Review
Gerrit Code ReviewGerrit Code Review
Gerrit Code Review
 
vodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As codevodQA Pune (2019) - Jenkins pipeline As code
vodQA Pune (2019) - Jenkins pipeline As code
 
Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...
Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...
Implementing a Continuous Delivery pipeline using OW2 infrastructure, OW2con'...
 
Agile software architecture
Agile software architectureAgile software architecture
Agile software architecture
 

Similar to QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito

3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile ReleasesDrew Hannay
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationHùng Nguyễn Huy
 
Building a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformBuilding a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformAngus Fox
 
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...Gibran Badrulzaman
 
Hyd virtual meetupslides11jul
Hyd virtual meetupslides11julHyd virtual meetupslides11jul
Hyd virtual meetupslides11julSantosh Ojha
 
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...WSO2
 
Continuous Delivery at Snyk
Continuous Delivery at SnykContinuous Delivery at Snyk
Continuous Delivery at SnykAnton Drukh
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous DeploymentBrian Moon
 
How to boost your workflow, or git rebase for designers
How to boost your workflow, or git rebase for designersHow to boost your workflow, or git rebase for designers
How to boost your workflow, or git rebase for designersAnton Parkhomenko
 
Develop, deploy, and operate services at reddit scale oscon 2018
Develop, deploy, and operate services at reddit scale   oscon 2018Develop, deploy, and operate services at reddit scale   oscon 2018
Develop, deploy, and operate services at reddit scale oscon 2018Gregory Taylor
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...LetsConnect
 
The magic ingredient for successful automation - Chapter 2
The magic ingredient for successful automation - Chapter 2The magic ingredient for successful automation - Chapter 2
The magic ingredient for successful automation - Chapter 2Bonitasoft
 
Introduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OKIntroduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OKKriangkrai Chaonithi
 
Cross Platform Angular 2 and TypeScript Development
Cross Platform Angular 2 and TypeScript DevelopmentCross Platform Angular 2 and TypeScript Development
Cross Platform Angular 2 and TypeScript DevelopmentJeremy Likness
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategiesRaquel Pau
 
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)Giovanni Toraldo
 

Similar to QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito (20)

3x3 Speeding Up Mobile Releases
3x3 Speeding Up Mobile Releases3x3 Speeding Up Mobile Releases
3x3 Speeding Up Mobile Releases
 
3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases3x3: Speeding Up Mobile Releases
3x3: Speeding Up Mobile Releases
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Building a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator PlatformBuilding a scalable app factory with Appcelerator Platform
Building a scalable app factory with Appcelerator Platform
 
Debugging 2013- Lars pedersen
Debugging 2013- Lars pedersenDebugging 2013- Lars pedersen
Debugging 2013- Lars pedersen
 
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
Understanding the GitOps Workflow and CICD Pipeline - What It Is, Why It Matt...
 
Hyd virtual meetupslides11jul
Hyd virtual meetupslides11julHyd virtual meetupslides11jul
Hyd virtual meetupslides11jul
 
Automatise everyday work - Sara Krk
Automatise everyday work - Sara KrkAutomatise everyday work - Sara Krk
Automatise everyday work - Sara Krk
 
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
[APIdays Singapore 2019] Managing the API lifecycle with Open Source Technolo...
 
Continuous Delivery at Snyk
Continuous Delivery at SnykContinuous Delivery at Snyk
Continuous Delivery at Snyk
 
Continuous Deployment
Continuous DeploymentContinuous Deployment
Continuous Deployment
 
How to boost your workflow, or git rebase for designers
How to boost your workflow, or git rebase for designersHow to boost your workflow, or git rebase for designers
How to boost your workflow, or git rebase for designers
 
Develop, deploy, and operate services at reddit scale oscon 2018
Develop, deploy, and operate services at reddit scale   oscon 2018Develop, deploy, and operate services at reddit scale   oscon 2018
Develop, deploy, and operate services at reddit scale oscon 2018
 
Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...Philipe Riand - Building Social Applications using the Social Business Toolki...
Philipe Riand - Building Social Applications using the Social Business Toolki...
 
The magic ingredient for successful automation - Chapter 2
The magic ingredient for successful automation - Chapter 2The magic ingredient for successful automation - Chapter 2
The magic ingredient for successful automation - Chapter 2
 
Introduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OKIntroduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OK
 
Cross Platform Angular 2 and TypeScript Development
Cross Platform Angular 2 and TypeScript DevelopmentCross Platform Angular 2 and TypeScript Development
Cross Platform Angular 2 and TypeScript Development
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
 
RealDay: Angular.js
RealDay: Angular.jsRealDay: Angular.js
RealDay: Angular.js
 
Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)Continuous Delivery: 5 years later (Incontro DevOps 2018)
Continuous Delivery: 5 years later (Incontro DevOps 2018)
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito

  • 1. @LinkedInEng | @mockitoguy CI/CD at scale Lessons from LinkedIn and Mockito QCon, San Francisco, 11-2017 ● Szczepan Faber @mockitoguy ● Born in Poland (we like our zzz’s) In US since 2015 ● Codes professionally since 2002 ● Creator of mockito.org in 2007 ● Core dev of gradle.org 1.x and 2.x in 2011-2015 ● Tech Lead at LinkedIn Dev Tools since 2015 http://bit.do/li-tools ● Author on LinkedIn: http://bit.do/mockitoguy ● How to build great code review culture? http://bit.do/li-code-review ● Want to write great tests? My workshop at QCon on Thursday: http://bit.do/qcon-testing ● Want to innovate and push CD in Open Source? Join shipkit.org New project used by Mockito!
  • 3. @LinkedInEng | @mockitoguy 2. CD in OSS Mockito (@MockitoJava) ● I created mocking framework Mockito in 2007 ● The team adopted CD in 2014 ● We ship every pull request to production to estimated 2M users Get ready to be excited about CD! Development Tools ● Build tools, Gradle, CI ● Code review, IDEs ● and more! ● I’m an architect, tech lead, engineer working on development tools at LinkedIn since 2015. 1. CD at LinkedIn (@LinkedInEng) ● linkedin.com adopted CD in 2015, shipping 3x day to 500M users. LinkedIn Engineering (3000+) Foundation team (300+) ● Kudos to great engineers working at LinkedIn, linkedin.com and the tools. I am a part of a team.
  • 4. @LinkedInEng | @mockitoguy CD at linkedin.com by the numbers ○ 1000 commits, 300 unique committers across 4 main codebases ○ Web app, API server app, Android app, iOS app ○ The stats exclude other codebases (libraries, downstream microservices) ○ LinkedIn does not use (nor wants or needs) mono-repo. We currently have 7000+ codebases. ● Last quarter (Q3 ‘17): ○ 300 pushes to production (web app + api server) ○ 21 mobile app pushes (android + iOS, excluding Beta) ● LinkedIn engineering is more than linkedin.com ○ Other products exercise CD as well but don’t have such big codebase or number of committers ○ linkedin.com (flagship) is very progressive and paves the way for other LinkedIn software products ● Last week (5-11 Nov ‘17)
  • 5. Part 1. CD is hard What do we do if something is hard?
  • 6. @LinkedInEng | @mockitoguy Why CD in linkedin.com? ● reduce the lead time to make positive business impact ○ ship features to production faster ● increase engineering productivity and happiness ○ avoid release overhead ■ avoid wasted time on stabilizing (bugfixing) the release branch. Code should be always stable and ready to ship! ■ avoid wasted time on cherry-picking. Trunk based development. ○ avoid feature rush - last minute commit volume spike before the release ● improve quality ○ small incremental releases pose small risk and are easier to fix ○ avoid rollbacks and hotfixes. Instead we fix forward The arguments apply to every software project! In 2015 we launched 3x3 project - 3 releases per day, 3 hour max time commit-to-production. Our goals:
  • 7. @LinkedInEng | @mockitoguy 3x3 @LI ○ Because we want to iterate fast. Plus it helps with resilience because we can afford to miss a release ● Why 3 hours max time commit-to-production? ○ Because to ship 3 times a day, the commit-to-production pipeline needs speed ○ And it forces us to sort out our testing strategy (not enough time for manual or slow tests) ● In 2015 we completed mobile web and mobile apps ● In 2016 we completed desktop web ● Today we release linkedin.com several times a day ● LinkedIn Mobile apps are released every week, with 3 beta releases per week (iOS Beta - once a week) ● Why 3 times per day?
  • 8. @LinkedInEng | @mockitoguy ● Learning how to write great tests - what to test, how to test, how to write code that is easy to test ● Flaky test is worse than no test - detecting flaky tests automatically, overnight, using A/A testing ● Production grade tests and infrastructure - in the past, tests and build code were not considered equally important as production code ● Many existing tools, including OSS did not scale for CD ● Need for speed – testing in parallel and distributed ● Master branch always green - Running all validations before code is merged to master CD lessons @LI
  • 9. @LinkedInEng | @mockitoguy Current 3x3 stats for linkedin.com Commits and unique committers in last week Avg. time commit-to-shippable in last week # of actual and target releases in Q3 2017 (*) in actuality, it is higher because commits to libraries are not included Web 317/115 150 min. 173/162 API 183/77 69 min. 123/162 iOS 164/69 165 min. 10/12 Android 241/72 72 min. 11/12 Combined 905*/333
  • 10. @LinkedInEng | @mockitoguy Opportunities @LI ● Increase discipline of fixing flaky tests ● Avoid redundant work in the pipeline ● For Android: simulator service, speed ● For iOS: Beta channel, Swift compiler stability and speed ● For Web app: browser cache ● For API server: avoid redundant work (Gradle Distributed Cache) BTW. we use Play on Gradle for our API server: http://bit.do/play-on-gradle ● Minimize commit-to-shippable time ● Increase commit-to-shippable pipeline success rate (pipeline & tests stability) ● Hit the desired number of production releases And many more! We keep improving the system!!!
  • 11. @LinkedInEng | @mockitoguy 3x3 resources LinkedIn Engineering Blog: http://bit.do/li-3x3
  • 12. @LinkedInEng | @mockitoguy Development Workflow @LI ● Multi-codebase architecture, 7000 codebases, 60% active ● Every codebase is governed by our “Multiproduct” framework ● Every Multiproduct has independent release cadence ● Every code change produces new version ● Trunk based development ● Mandatory code review (code owner must approve every change) ● Automation of commit-to-production pipeline CD requires disciplined development workflow. How software is developed at LinkedIn? (all our software, not only linkedin.com)
  • 13. @LinkedInEng | @mockitoguy Every codebase is a Multiproduct @LI ● One engineering culture ● Every engineer can contribute to any codebase ● Why matters? Easier to introduce CD into one culture
  • 14. @LinkedInEng | @mockitoguy Every change is a new version @LI ● And every new version can be shipped to production ● Why matters? ○ Makes it impossible to defer quality. ○ Clean code every day!
  • 15. @LinkedInEng | @mockitoguy Trunk based development @LI ● Incremental code changes, hiding incomplete features ● Feature toggles, “branch by abstraction” pattern http://bit.do/branch-by-abstraction ● Why matters? Forces small, incremental changes. Avoids merge and cherry-picking overhead. ● No long-lived feature branches ● All changes on main branch, which is always stable and ready to ship
  • 16. @LinkedInEng | @mockitoguy Mandatory code review @LI ● Somebody reads my code (and wants me to fix it)! ● Culture of feedback, learning and improving http://bit.do/li-code-review ● Why matters? Clean, elegant code makes it easier to iterate
  • 17. @LinkedInEng | @mockitoguy Downstream dependency testing @LI ● Building code that depends on my code ● Strong signal in our CI pipeline ● Flaky tests are a problem to the entire ecosystem ● Why matters? avoiding regressions, catching integration problems early
  • 18. @LinkedInEng | @mockitoguy Automation of commit-to-production @LI ● The code I write or review goes to production within hours ● I am responsible for the quality ● Why it matters? Requires state of the art automated testing ○ BTW. I run a Java testing workshop on Thursday at QCon http://bit.do/qcon-testing
  • 19. @LinkedInEng | @mockitoguy CI/CD pipeline @LI For all our software, not only components of linkedin.com ● Code change ● Code review (strong code ownership, owner must approve) ● Pre/post push validation (CI builds) ● Downstream dependency testing (test code that depend on me) ● New version ready! ● Staging ● Canary (deploy and test on single host) ○ Mobile uses Beta channel ● Ramp-up features (feature toggles) ○ Code push != feature push ● Remove feature toggle (dead code) ● Consumers that use wildcard versions pick up new version in the next build. ● Consumers that use pinned version can be updated automatically using “Push my Upgrade” system. ● We can deprecate/end-of-life previous versions Apps Libraries Dev workflow for all software at LinkedIn. Ready for part 2 (OSS)?
  • 20. @mockitoguy Part 2. CD. in OSS Mockito Powered by shipkit.org
  • 21. @mockitoguy Open Source Mocking Framework for Java ● Mockito started in 2007 ● 1.0 in 2008 ● Hit mainstream in 2010 ● Mostly manual releases...
  • 22. Combined result puts Mockito on 3rd place!
  • 23. @mockitoguy 2014 - Mockito adopts CD. ● Every merged pull request produces a new version and ships to public repo ● Scale: we estimate 2M users ● Prevent release procrastination (dreading to write release notes…)
  • 24. @mockitoguy Benefits of CD in OSS ● Productivity – zero release overhead ● Happy users – get features faster ● Faster debugging – quickly identify bad version (MTTR) ● Sustainability – release & stay alive ● No waste - no unreleased code ● Quality – self-enforced craftsmanship of every change ● Thriving, engaged community – contributions are released quickly
  • 25. @mockitoguy Community Feedback ● Quality anxiety - you ship every pull request to production, are you shipping every bug, too? - we ensure quality via immense battery of tests and rigorous code review ● What version of “mockito-core” to use? - currently 244 versions in Maven Central - use latest! We take compatibility VERY seriously. Sem ver! ● Dependency management cost - worry that any version upgrade may bring incompatibilities to the dependency graph - we get it. We strive to minimize Mockito dependencies. We understand that every dependency is a liability to our customers
  • 26. @mockitoguy Mockito releases By Shipkit ● Shipkit - toolkit for shipping it for Java libraries ● Passionate about release automation? ● http://shipkit.org
  • 27. @LinkedInEng | @mockitoguy Ready for CD? ● Imagine how fast you can ship changes that can create positive business impact ● Imagine unhindered productivity without the release overhead ● Imagine higher quality because smaller, incremental releases are a smaller risk ● Imagine that every code change is excellent, with clean code and great tests ● Imagine how reliable the commit-to-production pipeline is if it is battle tested daily ● At linkedin.com we land 1000 commits per week and ship to production several times a day to 500M+ users. ● In the Open Source, Mockito library ships to production every pull request to estimated 2M users Now it is your turn! Questions?