bertjan@openvalue.nl
Microservices in action
at the Dutch National Police
Bert Jan Schrijver
@bjschrijver
Bert Jan Schrijver
L e t ’ s m e e t
@bjschrijver
Architecture and
platform
Frontend
Methodology
and culture
Introduction
Development and
testing
Build tools, deployments
and running in production
Challenges and
looking ahead
Outline
W h a t ‘ s n e x t ?
Backend
@bjschrijver
The police protects the
democracy, maintains the law
and is the authority on the
streets. Around 65.000 people
work at the Dutch police, of
which over 1500 IT
professionals.
Dutch National Police
CLOUD
PLATFORM
ANALYSE
PATRONEN
BIG DATA
SECURITY5 DevOps teams are building
high tech big data web
applications in a private cloud
environment. These
applications support police
related themes.
Product line
Cloud | Big Data | Internet
Methodology and culture
• 5 teams, separate backlogs
• Overall planning at start of sprint
• Minimal planning ritual
• Usability tests as part of sprint
• (Almost) no meetings
• Phabricator as tool of choice
Methodology
• Continuous Delivery & DevOps
• Short feedback loops
• Embrace change
• Minimal dependencies outside team
• Invest in people, not in products
• Open, transparent, verifiable
Culture
Source: http://kids.nationalgeographic.com/explore/countries/netherlands/#netherlands-tulip-fields.jpg
• How to handle support, monitoring and
(pro-active) maintenance during sprint?
Make this a role that cycles through the
team.
“Operator of the day” and “Developer of
the day”
Culture
Source: http://kids.nationalgeographic.com/explore/countries/netherlands/#netherlands-tulip-fields.jpg
Architecture and platform
• End-to-end security and encryption
• Version control for everything
• Horizontally scalable, no single points of failure
• No runtime dependencies on external systems
• Standardised naming
• Right tool for the job (polyglot)
Architecture
Architecture
• This slide is intentionally left blank…
Current architecture
Current architecture
Current architecture
Current architecture
Current architecture
Current architecture
Current architecture
Current architecture
Source: https://www.google.com/about/datacenters
• OpenStack private cloud
• Ceph distributed storage
• General cloud services for police
organisation
• 3000 managed desktops
• Automation starts when hardware boots
Platform
Source: https://www.google.com/about/datacenters
• 100’s of physical servers
• 14 physical disks per server
• It’s not a matter IF stuff breaks but WHEN
Platform
Source: https://www.google.com/about/datacenters
• How to manage 100’s of physical servers,
1000’s of virtual servers and 1000’s of
desktops?
Infrastructure as code.

Terraform for cloud, Puppet for servers,
Ansible for desktops
Platform
Frontend
• Angular 5.x, TypeScript, RxJS
• Bootstrap, responsive design
• Graceful degradation when backend fails
• All console logs/errors go to centralised
logging system
Frontend
• How to decouple building a feature from
release and deployment?
Use feature toggles.
Frontend
• How to prevent creating a monolithic
frontend?
Apply microservice principles to the
frontend too.
Create re-usable frontend components as
standalone component libraries.
Frontend
Backend
• Small in size, single responsibility
• Runs in its own process
• Independently develop, deploy, upgrade, scale
• Has its own data store
• Distributed by default
• Potentially heterogeneous/polyglot
• Light-weight communication
Anatomy of a microservice
• Did we build microservices right from the start?
Nope.
• Why did we move to a microservices architecture?
• Scalability: both for performance/load and
development teams
• Modularity: independent development and
deployment of each part of the system
• The ‘cool factor’ helped bit ;-)
The path to microservices
• How did we move to microservices?
• Split the existing system in modules (bounded
contexts) - defined by business functionality
• For each module, create a microservice
• For every microservice, check if it now only
serves 1 part of the domain
• If so: cool. If not: repeat - split it up more.
The path to microservices
• Spring Boot, Java 8, Maven
• Stateless
• 1 service in 1 jar on 1 JVM on 1 host (and 1 git project)
• Minimal amount of shared code:
• Security
• Logging and metrics
• Past: high available via load balancers
• Present: service discovery
Backend
Service discovery is an advanced pattern.
Do you need it?
Probably not.
Do we need it?
We think we do.
Service discovery
Service discovery
Why do we use service discovery?
• HA & load balancing without single points of failure
• Direct secure end-to-end client-service comm.
• Kerberos: picky on DNS verification
• Dynamic horizontal scaling
• Resilience: automated response to failure
• Location transparency
• Zero downtime deployments
Consul cluster
service-example0
service-example1
Gebruiker
ui-example0
(webserver)
consul-template
sseserver
Service discovery setup
• Client-side discovery
• Self-registration
Development and testing
• Feature branch based development
• Master branch must always be releasable
• Test environment on OpenStack runs the
master branch
• Feature branches only live locally and on
the CI server
Development
• How to locally run a system that consists
of ~50 services?
Run only the component(s) you work on
locally.
For other components, local env connects
to test env on OpenStack
Development
• Unit tests
• Mutation tests
• Service/integration tests: Spring boot
integration, embedded in-memory data
stores, REST assured
• End-to-end test: Protractor
• Load tests: Gatling
Testing
• How to test feature branches in a
microservices environment?
Spin up branch version of component in a
container on the CI environment.
For dependencies, connect to test env.
Avoid changing multiple components at once.
Testing
Build tools, deployments
and running in production
• Gitlab
• Jenkins with Docker swarm slave nodes
• Jenkins 2 pipelines
• Nexus
• Sonar
Build tools
• How to manage >100 builds with a single
team?
Create modular, reusable build
definitions.
(See https://virtualjug.com/pipeline-as-code-building-
continuous-delivery-pipelines-with-jenkins-2/)
Build tools
• Every push to master is a release
• Config embedded in executable jar
• Deployments
• currently: Rundeck and Puppet
• soon: Nomad
Deployments
• How to know when, what and which version(s)
to deploy?
• Minimise administration and think time.
• Test environment: deploy component on commit
• Everything from test -> acc during sprint
• Everything from acc -> prod after sprint
• Single component test -> acc -> prod when needed
Deployments
• Logging and dashboards via Graylog
• Metrics:
• Spring Boot actuator
• Distributed tracing with Zipkin
• Grafana for graphs
• Kafka stats via Burrow
• Monitoring via Sensu and Flapjack
Running in production
Photo: Dave Lehl
Challenges and looking ahead
Challenges
01
Share as little as possible; prefer
duplication over coupling.
Sharing code between services
04Authentication and authorisation
happen at every request. Find the
balance between performance and
security.
Running stateless has a cost
When moving fast,
don’t forget to finish up before
starting something new.
Switching focus has a cost
06
Throwing something away and
starting over can work out better
than refactoring.
Don’t be afraid to rebuild03
Microservices are not just for the
backend. Modularity is just as
important on the frontend.
Monolithic frontend
02
Minimalize dependencies on
other teams, or it will slow you
down.
Cross functional team
composition is vital
05
and lessons learned
@bjschrijver
Looking ahead
Upgrades and fixes without users even
noticing.
0-downtime deployments
Our plans for the (near) future.
@bjschrijver
Cross-functional teams with vertical
(full stack) responsibilities.
Product teams
Split the frontend in products and re-
usable components.
Modular frontend
There is no silver bullet here, but useful
tools and practices do exist.
Automated security testing
Get the teams the information they
need, but only when they need it.
Better dashboards and alerting
Questions?
@bjschrijver
Thanks for your time.
Got feedback? Tweet it!
All pictures belong
to their respective
authors
@bjschrijver

More Related Content

PDF
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
PDF
Devoxx PL 2018 - Microservices in action at the Dutch National Police
PDF
Microservices in action at the Dutch National Police
PDF
JavaZone 2017 - Microservices in action at the Dutch National Police
PDF
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
PDF
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
PDF
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
PPTX
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
Devoxx PL 2018 - Microservices in action at the Dutch National Police
Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National Police
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
Kubernetes at NU.nl (Kubernetes meetup 2019-09-05)

What's hot (19)

PDF
Netflix Open Source Meetup Season 3 Episode 2
PDF
What we talk about when we talk about DevOps
KEY
Migrating big data
PDF
Greenfields tech decisions
PDF
Python & Cassandra - Best Friends
PPTX
Hot to build continuously processing for 24/7 real-time data streaming platform?
PDF
Diagnosing Problems in Production: Cassandra Summit 2014
PPTX
Cloud patterns
PPTX
DefCore: The Interoperability Standard for OpenStack
PPTX
OpenStack: Toward a More Resilient Cloud
PDF
How DreamHost builds a Public Cloud with OpenStack
PDF
Netflix Cloud Architecture and Open Source
PDF
"In love with Open Source : Past, Present and Future" : Keynote OSDConf 2014
PDF
Netflix OSS Meetup Season 4 Episode 4
PDF
Hacklu2011 tricaud
PPTX
Getting a Neural Network Up and Running with OpenLab
PDF
SaltStack - An open source software story
PPTX
OpenStack 101 - All Things Open 2015
PPTX
Rebooting design in RavenDB
Netflix Open Source Meetup Season 3 Episode 2
What we talk about when we talk about DevOps
Migrating big data
Greenfields tech decisions
Python & Cassandra - Best Friends
Hot to build continuously processing for 24/7 real-time data streaming platform?
Diagnosing Problems in Production: Cassandra Summit 2014
Cloud patterns
DefCore: The Interoperability Standard for OpenStack
OpenStack: Toward a More Resilient Cloud
How DreamHost builds a Public Cloud with OpenStack
Netflix Cloud Architecture and Open Source
"In love with Open Source : Past, Present and Future" : Keynote OSDConf 2014
Netflix OSS Meetup Season 4 Episode 4
Hacklu2011 tricaud
Getting a Neural Network Up and Running with OpenLab
SaltStack - An open source software story
OpenStack 101 - All Things Open 2015
Rebooting design in RavenDB
Ad

Similar to Dublin JUG February 2018 - Microservices in action at the Dutch National Police (20)

PDF
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
PDF
GeekOut 2017 - Microservices in action at the Dutch National Police
PDF
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
PDF
J-Spring 2017 - Microservices in action at the Dutch National Police
PPTX
Microservices: Yes or not?
PPTX
12 Factor App Methodology
PPTX
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
PPTX
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
PDF
Advanced dev ops governance with terraform
PDF
Introduction to the Typesafe Reactive Platform
PPTX
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
PPTX
From Zero to Serverless
PPTX
Micro Services Architecture
PPTX
From Zero to Serverless (DogFoodCon 2018)
PPTX
Kubernetes Infra 2.0
PPTX
Why kubernetes matters
PDF
Containers, microservices and serverless for realists
PPTX
Node.js Dublin Meetup April 2014
PPTX
Top 10 dev ops tools (1)
PPTX
Serverless: The future of application delivery
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
GeekOut 2017 - Microservices in action at the Dutch National Police
Continuous Delivery Amsterdam - Microservices in action at the Dutch National...
J-Spring 2017 - Microservices in action at the Dutch National Police
Microservices: Yes or not?
12 Factor App Methodology
Dutch Oracle Architects Platform - Reviewing Oracle OpenWorld 2017 and New Tr...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
Advanced dev ops governance with terraform
Introduction to the Typesafe Reactive Platform
DevOps Fest 2020. Kohsuke Kawaguchi. GitOps, Jenkins X & the Future of CI/CD
From Zero to Serverless
Micro Services Architecture
From Zero to Serverless (DogFoodCon 2018)
Kubernetes Infra 2.0
Why kubernetes matters
Containers, microservices and serverless for realists
Node.js Dublin Meetup April 2014
Top 10 dev ops tools (1)
Serverless: The future of application delivery
Ad

Recently uploaded (20)

PPTX
IT-Human Computer Interaction Report.pptx
PPTX
Introduction: Living in the IT ERA.pptx
PDF
Slides World Games Great Redesign Eco Economic Epochs.pdf
PPTX
北安普顿大学毕业证UoN成绩单GPA修改北安普顿大学i20学历认证文凭
PPTX
REE IN CARBONATITE EEPOSIT AND INCLUDE CASE STUDY ON AMBADUNGAR
PPSX
AI AppSec Threats and Defenses 20250822.ppsx
PDF
The_Decisive_Battle_of_Yarmuk,battle of yarmuk
PPTX
National-Historical-Commission-of-the-PhilippinesNHCP.pptx
PPTX
Partner to Customer - Sales Presentation_V23.01.pptx
PDF
Paper: World Game (s) Great Redesign.pdf
PDF
Lesson.-Reporting-and-Sharing-of-Findings.pdf
PPTX
日本横滨国立大学毕业证书文凭定制YNU成绩单硕士文凭学历认证
PDF
Testing & QA Checklist for Magento to Shopify Migration Success.pdf
DOCX
Audio to Video AI Technology Revolutiona
PPTX
Basic_of_Computer_System.pptx class-8 com
PPT
Expect The Impossiblesssssssssssssss.ppt
DOCX
MLS 113 Medical Parasitology (LECTURE).docx
PPTX
PORTFOLIO SAMPLE…….………………………………. …pptx
PPTX
Digital Project Mastery using Autodesk Docs Workshops
PDF
ilide.info-huawei-odn-solution-introduction-pdf-pr_a17152ead66ea2617ffbd01e8c...
IT-Human Computer Interaction Report.pptx
Introduction: Living in the IT ERA.pptx
Slides World Games Great Redesign Eco Economic Epochs.pdf
北安普顿大学毕业证UoN成绩单GPA修改北安普顿大学i20学历认证文凭
REE IN CARBONATITE EEPOSIT AND INCLUDE CASE STUDY ON AMBADUNGAR
AI AppSec Threats and Defenses 20250822.ppsx
The_Decisive_Battle_of_Yarmuk,battle of yarmuk
National-Historical-Commission-of-the-PhilippinesNHCP.pptx
Partner to Customer - Sales Presentation_V23.01.pptx
Paper: World Game (s) Great Redesign.pdf
Lesson.-Reporting-and-Sharing-of-Findings.pdf
日本横滨国立大学毕业证书文凭定制YNU成绩单硕士文凭学历认证
Testing & QA Checklist for Magento to Shopify Migration Success.pdf
Audio to Video AI Technology Revolutiona
Basic_of_Computer_System.pptx class-8 com
Expect The Impossiblesssssssssssssss.ppt
MLS 113 Medical Parasitology (LECTURE).docx
PORTFOLIO SAMPLE…….………………………………. …pptx
Digital Project Mastery using Autodesk Docs Workshops
ilide.info-huawei-odn-solution-introduction-pdf-pr_a17152ead66ea2617ffbd01e8c...

Dublin JUG February 2018 - Microservices in action at the Dutch National Police

  • 1. [email protected] Microservices in action at the Dutch National Police Bert Jan Schrijver @bjschrijver
  • 2. Bert Jan Schrijver L e t ’ s m e e t @bjschrijver
  • 3. Architecture and platform Frontend Methodology and culture Introduction Development and testing Build tools, deployments and running in production Challenges and looking ahead Outline W h a t ‘ s n e x t ? Backend @bjschrijver
  • 4. The police protects the democracy, maintains the law and is the authority on the streets. Around 65.000 people work at the Dutch police, of which over 1500 IT professionals. Dutch National Police
  • 5. CLOUD PLATFORM ANALYSE PATRONEN BIG DATA SECURITY5 DevOps teams are building high tech big data web applications in a private cloud environment. These applications support police related themes. Product line Cloud | Big Data | Internet
  • 7. • 5 teams, separate backlogs • Overall planning at start of sprint • Minimal planning ritual • Usability tests as part of sprint • (Almost) no meetings • Phabricator as tool of choice Methodology
  • 8. • Continuous Delivery & DevOps • Short feedback loops • Embrace change • Minimal dependencies outside team • Invest in people, not in products • Open, transparent, verifiable Culture Source: http://kids.nationalgeographic.com/explore/countries/netherlands/#netherlands-tulip-fields.jpg
  • 9. • How to handle support, monitoring and (pro-active) maintenance during sprint? Make this a role that cycles through the team. “Operator of the day” and “Developer of the day” Culture Source: http://kids.nationalgeographic.com/explore/countries/netherlands/#netherlands-tulip-fields.jpg
  • 11. • End-to-end security and encryption • Version control for everything • Horizontally scalable, no single points of failure • No runtime dependencies on external systems • Standardised naming • Right tool for the job (polyglot) Architecture
  • 12. Architecture • This slide is intentionally left blank…
  • 21. Source: https://www.google.com/about/datacenters • OpenStack private cloud • Ceph distributed storage • General cloud services for police organisation • 3000 managed desktops • Automation starts when hardware boots Platform
  • 22. Source: https://www.google.com/about/datacenters • 100’s of physical servers • 14 physical disks per server • It’s not a matter IF stuff breaks but WHEN Platform
  • 23. Source: https://www.google.com/about/datacenters • How to manage 100’s of physical servers, 1000’s of virtual servers and 1000’s of desktops? Infrastructure as code.
 Terraform for cloud, Puppet for servers, Ansible for desktops Platform
  • 25. • Angular 5.x, TypeScript, RxJS • Bootstrap, responsive design • Graceful degradation when backend fails • All console logs/errors go to centralised logging system Frontend
  • 26. • How to decouple building a feature from release and deployment? Use feature toggles. Frontend
  • 27. • How to prevent creating a monolithic frontend? Apply microservice principles to the frontend too. Create re-usable frontend components as standalone component libraries. Frontend
  • 29. • Small in size, single responsibility • Runs in its own process • Independently develop, deploy, upgrade, scale • Has its own data store • Distributed by default • Potentially heterogeneous/polyglot • Light-weight communication Anatomy of a microservice
  • 30. • Did we build microservices right from the start? Nope. • Why did we move to a microservices architecture? • Scalability: both for performance/load and development teams • Modularity: independent development and deployment of each part of the system • The ‘cool factor’ helped bit ;-) The path to microservices
  • 31. • How did we move to microservices? • Split the existing system in modules (bounded contexts) - defined by business functionality • For each module, create a microservice • For every microservice, check if it now only serves 1 part of the domain • If so: cool. If not: repeat - split it up more. The path to microservices
  • 32. • Spring Boot, Java 8, Maven • Stateless • 1 service in 1 jar on 1 JVM on 1 host (and 1 git project) • Minimal amount of shared code: • Security • Logging and metrics • Past: high available via load balancers • Present: service discovery Backend
  • 33. Service discovery is an advanced pattern. Do you need it? Probably not. Do we need it? We think we do. Service discovery
  • 34. Service discovery Why do we use service discovery? • HA & load balancing without single points of failure • Direct secure end-to-end client-service comm. • Kerberos: picky on DNS verification • Dynamic horizontal scaling • Resilience: automated response to failure • Location transparency • Zero downtime deployments
  • 37. • Feature branch based development • Master branch must always be releasable • Test environment on OpenStack runs the master branch • Feature branches only live locally and on the CI server Development
  • 38. • How to locally run a system that consists of ~50 services? Run only the component(s) you work on locally. For other components, local env connects to test env on OpenStack Development
  • 39. • Unit tests • Mutation tests • Service/integration tests: Spring boot integration, embedded in-memory data stores, REST assured • End-to-end test: Protractor • Load tests: Gatling Testing
  • 40. • How to test feature branches in a microservices environment? Spin up branch version of component in a container on the CI environment. For dependencies, connect to test env. Avoid changing multiple components at once. Testing
  • 41. Build tools, deployments and running in production
  • 42. • Gitlab • Jenkins with Docker swarm slave nodes • Jenkins 2 pipelines • Nexus • Sonar Build tools
  • 43. • How to manage >100 builds with a single team? Create modular, reusable build definitions. (See https://virtualjug.com/pipeline-as-code-building- continuous-delivery-pipelines-with-jenkins-2/) Build tools
  • 44. • Every push to master is a release • Config embedded in executable jar • Deployments • currently: Rundeck and Puppet • soon: Nomad Deployments
  • 45. • How to know when, what and which version(s) to deploy? • Minimise administration and think time. • Test environment: deploy component on commit • Everything from test -> acc during sprint • Everything from acc -> prod after sprint • Single component test -> acc -> prod when needed Deployments
  • 46. • Logging and dashboards via Graylog • Metrics: • Spring Boot actuator • Distributed tracing with Zipkin • Grafana for graphs • Kafka stats via Burrow • Monitoring via Sensu and Flapjack Running in production
  • 47. Photo: Dave Lehl Challenges and looking ahead
  • 48. Challenges 01 Share as little as possible; prefer duplication over coupling. Sharing code between services 04Authentication and authorisation happen at every request. Find the balance between performance and security. Running stateless has a cost When moving fast, don’t forget to finish up before starting something new. Switching focus has a cost 06 Throwing something away and starting over can work out better than refactoring. Don’t be afraid to rebuild03 Microservices are not just for the backend. Modularity is just as important on the frontend. Monolithic frontend 02 Minimalize dependencies on other teams, or it will slow you down. Cross functional team composition is vital 05 and lessons learned @bjschrijver
  • 49. Looking ahead Upgrades and fixes without users even noticing. 0-downtime deployments Our plans for the (near) future. @bjschrijver Cross-functional teams with vertical (full stack) responsibilities. Product teams Split the frontend in products and re- usable components. Modular frontend There is no silver bullet here, but useful tools and practices do exist. Automated security testing Get the teams the information they need, but only when they need it. Better dashboards and alerting
  • 51. Thanks for your time. Got feedback? Tweet it! All pictures belong to their respective authors @bjschrijver