6 ways DevOps helped PrepSportswear move from monolith to microservices

46
6 ways DevOps helped PrepSportswear move from monolith to microservices Andi Grabner Performance Advocate @grabnerandi Richard Dominguez Developer in Operations Prep Sportswear

Transcript of 6 ways DevOps helped PrepSportswear move from monolith to microservices

Page 1: 6 ways DevOps helped PrepSportswear move from monolith to microservices

6 ways DevOps helped PrepSportswear move from monolith to microservices

Andi GrabnerPerformance Advocate@grabnerandi

Richard DominguezDeveloper in OperationsPrep Sportswear

Page 2: 6 ways DevOps helped PrepSportswear move from monolith to microservices

The Promise of

Page 3: 6 ways DevOps helped PrepSportswear move from monolith to microservices
Page 4: 6 ways DevOps helped PrepSportswear move from monolith to microservices
Page 5: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Confidential, Dynatrace, LLC

Goal: Becoming a software defined business

2013 2014 2015

$108m

$400m

$2bn est.

Source: “Creative destruction in the S&P500 index,” Jan 2014; "Uber Expands Funding Round as Revenue Growth Acceleratesm," Wall Street Journal, Feb 2015. See more discussion in “The Three Horsemen of the Digital Apocalypse Considered.”

52% of G500 since 2000 GONE Uber rumored net revenue

Page 6: 6 ways DevOps helped PrepSportswear move from monolith to microservices

What they really want!

Page 7: 6 ways DevOps helped PrepSportswear move from monolith to microservices
Page 8: 6 ways DevOps helped PrepSportswear move from monolith to microservices

700 deployments / YEAR

10 + deployments / DAY

50 – 60 deployments / DAY

Every 11.6 SECONDS

Page 9: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Not only fast delivered but also delivering fast!

-1000ms +2%

Response Time Conversions

-1000ms +10%

+100ms -1%

Page 10: 6 ways DevOps helped PrepSportswear move from monolith to microservices

60% Rate performance/response time as the #1

mobile app expectation- ahead of features and functionality -

Source: Forrester Research 2014

Page 11: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Why most (will) fail!

Page 12: 6 ways DevOps helped PrepSportswear move from monolith to microservices
Page 13: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Agenda and learning journey

2005

CEO started with new

business idea

Most successful shopping season in

company history

Building a DevOps Culture

Building a website Growing the monolith

Increased deployments

resulted in more failed deployments

Our pipeline: why we deploy less

frequently today!

Breaking the monolith -

deploy more frequent

Started with monitoring

Response time and availabilty

improvements

. . . 2014 2015 20172016

Page 14: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Let’s begin! PrepSportswear 10 years ago . . .

• SportsWear Inc. started out with our CEO Chad Hardvigson personally pressing shirts• The demand for specially made sport attire was high•No one was providing this type of specialty service

Page 15: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Technology ramp-up to the rescue . . .

•We needed a website• Automation was needed to handle large demand•New techniques in printing automation was quickly developed to meet increasing demand

Page 16: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Rapid development put stability in the back seat

• Fast development lead to continual instability• Instability lead to consistent breaks• Consistent breaks lead to developer ‘blindness’

Page 17: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Large buildup of half-done projects

•Development team was isolated from the rest of the company• Requirements for projects were deemed by the development team only•No true concept of “done” – no monitoring of usage

Page 18: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Monolith started to take shape

• Its easier to develop new features on top of each other• Its easier to setup one single (though large) application• Testing individual components, however became very difficult

Page 19: 6 ways DevOps helped PrepSportswear move from monolith to microservices

You are not alone in this world!

Page 20: 6 ways DevOps helped PrepSportswear move from monolith to microservices

The Monolith was getting uncontrollable

• PrepSportswear was heading toward a development nightmare• Development team didn’t

want to ‘see’ this reality• Constant fixes were a

common occurrenceHOW MANY DEPLOYMENTS

DID YOU MAKE?

Page 21: 6 ways DevOps helped PrepSportswear move from monolith to microservices

It‘s not about blind automation of pushing more bad code on new stacks through a pipeline

Page 22: 6 ways DevOps helped PrepSportswear move from monolith to microservices

It‘s not about blindly giving everyone ops powerto deploy changes only tested locally

Page 23: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Hard decisions needed to be made . . .

•New Director of Information Technology was hired to “help” with the system•Old development team didn’t see a problem – this caused a lot of friction• Certain individuals were let go

Page 24: 6 ways DevOps helped PrepSportswear move from monolith to microservices

PrepSportswear’s new beginning

•Hired the “right” people•DevOps mentality was soon adopted.• Moved into a two week sprint process

• Reduced the number of deployments

Page 25: 6 ways DevOps helped PrepSportswear move from monolith to microservices

We needed to reduce the number of deployments

• Increased the Quality for each deployment•Needed to create proper Monitoring when Deployment occurred• Invested in External Monitoring

Page 26: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Performance increase when new team started

Keynote time graph (April2014 – Dec 2015)

Page 27: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Performance increase when new team started

Time chart showing uptime availability (April2014 – Dec 2015)

Page 28: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Monitoring, monitoring, monitoring

• Adopted a true APM system• Implemented proper hardware monitoring •No more “customer’s will let us know if we have issues”…

Page 29: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Cool dashboards & metrics for biz & dev

Page 30: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Dashboards & metrics for DevOpsperformance focused

Page 31: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Dashboard & metrics for marketing

Page 32: 6 ways DevOps helped PrepSportswear move from monolith to microservices

• Overloaded Pages• Memory Leaks• Too many Database Queries• Bad External Web Service Calls• Threading Issues• Caching Issues• SEO Overuse of bots causing

larger load then nessessary• ....

Some of the top problems found ...

Page 33: 6 ways DevOps helped PrepSportswear move from monolith to microservices

#1: Dev: Don’t Check In Bad Code

Step #1: Execute your Tests just as you

always do ...

Step #2: ... but DO IT WITH Dynatrace!!

Page 34: 6 ways DevOps helped PrepSportswear move from monolith to microservices

#1: Dev: Don’t Check In Bad Code

Step #1: Execute your Tests just as you

always do ...

Step #2: ... but DO IT WITH Dynatrace!!

Step #3: Verify Code works as intended without leaving the IDE!

Page 35: 6 ways DevOps helped PrepSportswear move from monolith to microservices

#1: Analyzing every Unit, Integration & REST API test

#2: Key Architectural Metrics for each test

#3: Detecting regression based on measure per Checkin

#2: CI/CD: Stop Bad Builds through Metrics

Page 36: 6 ways DevOps helped PrepSportswear move from monolith to microservices

#3: Ops: Monitor your Services/Users after Deploy#1: Usage

Tip: UEM Conversion!#2: Load vs Response

Tip: See unusual spikes

#3: Architectural Metrics DB, Exceptions, Web

Service Calls

Page 37: 6 ways DevOps helped PrepSportswear move from monolith to microservices

#1: Do my campaigns work?

#2: Who are my users?

#5: Biz: Understand your End Users

Page 38: 6 ways DevOps helped PrepSportswear move from monolith to microservices

#6: Biz/UX: Optimize End User Behavior#1: Are they using the

features we built?

#2: Is there a difference between Premium and

Normal users?

#3: Does Performance have a Behavior Impact?

Page 39: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Metrics-Driven Pipeline: Stop Bad Builds Early!

Dev&Test: Personal License to Stop Bad Code when it

gets created!Tip: Dont leave your IDE!

Continuous Integration: Auto-Stop Bad Builds based on AppMetrics from Unit-, Integration, - Perf Tests

Tip: integrate with Jenkins, Bamboo ...

Prod: Monitor Usage and Runtime Behavior per Service, User Action,

Feature ...Tip: Stream to ELK, Splunk and Co ...

Automated Tests: Identify Non-Functional Problems by looking at App Metrics

Tip: Feed data back into your test tool!

Page 40: 6 ways DevOps helped PrepSportswear move from monolith to microservices

PrepSportswear build pipeline

• Developer checks in code• We use release branching on Git• We run a Release Build from TeamCity

• Build Code, Verify Build, Deploy in Test Environment• Run Functional Tests & Manual Acceptance Tests

• We dogfood our code: Deploy internally and use the new code• Since it’s a monolith app, everything is in the same deployment (e-

commerce site, internal only back-end services, marketing diagnostics, designer tools, etc..)

• Watch Dynatrace for failed transactions, poor performance, etc

Page 41: 6 ways DevOps helped PrepSportswear move from monolith to microservices

PrepSportswear Build Pipeline (continued)

• Pre-Release TiP – Test in Production• Deploy new code to a small set of

servers that will serve <10% traffic• Deployed servers have a higher set of

Dynatrace sensors that will be used to highly monitor incoming traffic.

• Once satisfied, we release to the rest of our external servers on the official release date

Page 42: 6 ways DevOps helped PrepSportswear move from monolith to microservices

The way forward… micro services

•Why move to Micro Services?•What Micro Services mean to maintain Business Relevance•Does the Cost justify the means to move toward Micro Services?

Page 43: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Image server as part of the monolith app

Page 44: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Future: Continuing breaking up the monolith

• Identifying Key Lines of Business of your App• Figuring out what is internal only and external only•Dependency Management

Page 45: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Q & AAndi GrabnerPerformance Advocate@grabnerandi

Richard DominguezDeveloper in OperationsPrep Sportswear

Page 46: 6 ways DevOps helped PrepSportswear move from monolith to microservices

Performance management for the digital customer age