SlideShare une entreprise Scribd logo
1  sur  87
Télécharger pour lire hors ligne
SERVICE DISCOVERY AND
CONFIGURATION MANAGEMENT AT
TRANSFERWISE
FIRST INTRODUCTIONS
INTROS
FAMOUS FOR
ESTONIAN FOUNDERS
EVANGELICAL CUSTOMERS
$1 BILLION IN TRANSFERS 

PER MONTH
SAVING OUR CUSTOMERS $50M
PER MONTH
ENGINEERING CULTURE
WEAK CODE OWNERSHIP
EVERY PART OF THE CODE IS
OWNED
ANY TEAM CAN CHANGE ANY PART
OF THE CODE
ENGINEERING FOR CUSTOMER
IMPACT
ENGINEERS GET CLOSE TO
CUSTOMERS AND MAKE DECISIONS
BASED ON DATA
SOME OF OUR TEAMS SERVICES
NEED TO BE HIGHLY RESPONSIVE,
SYNCHRONOUS AND SCALE REALLY
WELL
OUR PLATFORM TEAM IS 8 PEOPLE
STRONG
WITH A HUGE BACKLOG
HOW DID WE HANDLE IT BEFORE?
AN ENGINEER ASKS FOR A
PRODUCTION SERVICE
AND WAITS…
WAITS SOME MORE…
ASKS AGAIN…
WAITS SOME MORE…
GETS A SERVICE
NEEDS TO CHANGE PRODUCTION
CONFIG
WAITS…
THIS NEEDS TO STOP
TOO MUCH CHATTER
TOO LONG WAITS
STRESS FOR EVERYONE
CUSTOMERS SUFFER
WE NEED:
AUTOMATIC ALLOCATION
PROVISIONING
LOGGING AND MONITORING
WITHOUT ENGINEERS
SERVICE DISCOVERY CAN HELP
RESEARCH AND TEX
WHICH DISCOVERY APPROACH TO
CHOOSE?
CLIENT SIDE DISCOVERY
SELF REGISTRATION
NETFLIX OSS IS OUR WAY TO GO
PROOF OF CONCEPT
MAKE OUR MONOLITH CONSUME 1
SERVICE IN PRODUCTION
UNDERSTANDING THE SCOPE
Problem: making friends between spring cloud and anything
else except spring boot can be tricky. There is no good
adoption mechanism
Solution: grails and spring are close. Let’s read the source,
find out what hides beyond spring boot’s netflix-specific
annotations, mimic the approach it was designed for
Lets create a shared bean in the discovery space (used by
our monolith parts that consumes the config and starts
communication with Eureka)
Step 2: Let’s start a Ribbon LoadBalancer in that bean,
connect it with Eureka client and let him start listening for
apps
Step 3: Most of our communication is through
restTemplate. How can we make restTemplate awesome
and @LoadBalanced? Interceptors! Let’s build one
Step 4: Let’s add the interceptor to the
needed RestTemplate
Step 5: What if discovery
completely fails? Fallbacks!
IS THIS A PERFECT SOLUTION?
OF COURSE NOT!
NEED TO MAINTAIN
TIED TO RESTTEMPLATES
NEEDS ENGINEERS TO THINK ABOUT
IT
NOT GOOD ENOUGH
BUILD CLIENTS AND MAKE EVERY
CASE WORK AS A BLACK BOX
IF YOUR SERVICE WANTS TO BE
DISCOVERED - MAKE YOUR CLIENT
PROVIDE THE TOOLSET
PROBLEMS
SOME SERVICES HAVE A EUREKA CLIENT
OF THEIR OWN
EUREKA IS NOT USED TO IT
(CONFIGURATIONS ARE STORED IN A CONTEXT BEAN)
RESULTING IN OVERRIDES UNLESS
CONTROLLED
TESTING IS PROBLEMATIC
AS REQUIRES A FULL COPY OF PRODUCTION
TESTING THE PIECES IS COMPLETELY ON
THE ADOPTING ENGINEER
CHALLENGES
VARIATION IN HTTP COMMS AND
IMPLEMENTATIONS
FEIGN AS A CLIENT BUILDER
DIRECT FALLBACKS
HYSTRIX CIRCUIT BREAKING
SPLITTING BALANCING AND DISCOVERY
BETWEEN SERVICES
SOLUTION COMPATIBILITY
SPRING BOOT
EUREKA
RIBBON
SUPPORTING TOOLSET
AROUND 75% ADOPTION PROBLEMS
3 MONTHS
30 SERVICES IN PRODUCTION
20 MORE IN THE MAKING
E
GREAT
NOW WE HAVE LOTS OF SERVICE
CONFIG TO TRACK
LET’S MAKE THINGS AS BORING AS
POSSIBLE
LET’S PUT EVERYTHING IN
(PUPPET | CHEF | SALT | ANSIBLE)
JOB DONE
EXCEPT…
SECRET MANAGEMENT IS TRICKY
WE CAN MAKE IT WORK. BUT IS
THERE A LESS TEDIOUS WAY?
SPRING CLOUD CONFIG SERVER
NETFLIX ARCHAIUS
HASHICORP VAULT
NICE DOCUMENTATION:
HTTPS://CLOUD.SPRING.IO/SPRING-CLOUD-
CONFIG/SPRING-CLOUD-CONFIG.HTML
NAME/VALUE PAIRS
/ENCRYPT & /DECRYPT ENDPOINTS
EASY TO EMBED IN SPRING BOOT
APPLICATIONS
SIMPLE REST API, SO PLAYS WELL
WITH NON-SPRING TOO!
SUPPORTS TEMPLATE FILES… BUT
WE’VE NOT USED THEM
SECRETS DON’T NEED TO BE STORED
IN PLAIN TEXT:
/ENCRYPT
/DECRYPT
VAULT BACKEND:
REQUIRES A TOKEN FROM CLIENT
FAILFAST VS RETRY
GETTING IT INTO PRODUCTION:
“VOLUNTEERED” A FEW SERVICE
OWNERS
EVERYTHING WORKED SMOOTHLY. VERY
SUSPICIOUS.
BUGS FOUND!
GITHUB DOWN: CONFIG SERVER
GOES MENTAL
CONFIG SERVER CACHES LOCALLY,
BUT ALSO WILL ALWAYS CHECK FOR
NEW CONFIG IN THE REPO
VERY INFREQUENTLY… IT JUST DIES
AND WE DON’T KNOW WHY (YET)
(NEVER HAD >1 NODE DIE AT ONCE, SO
NOT AWFUL IMPACT, BUT CONCERNING)
RESULT: SERVICES ARE GETTING INTO
PRODUCTION FASTER
Let us change money transfer forever.
Together.
https://transferwise.com/jobs/

Contenu connexe

Plus de Outlyer

Plus de Outlyer (20)

How & When to Feature Flag
How & When to Feature FlagHow & When to Feature Flag
How & When to Feature Flag
 
Why You Need to Stop Using "The" Staging Server
Why You Need to Stop Using "The" Staging ServerWhy You Need to Stop Using "The" Staging Server
Why You Need to Stop Using "The" Staging Server
 
How GitHub combined with CI empowers rapid product delivery at Credit Karma
How GitHub combined with CI empowers rapid product delivery at Credit Karma How GitHub combined with CI empowers rapid product delivery at Credit Karma
How GitHub combined with CI empowers rapid product delivery at Credit Karma
 
Packaging Services with Nix
Packaging Services with NixPackaging Services with Nix
Packaging Services with Nix
 
Minimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestrationMinimum Viable Docker: our journey towards orchestration
Minimum Viable Docker: our journey towards orchestration
 
Ops is dead. long live ops.
Ops is dead. long live ops.Ops is dead. long live ops.
Ops is dead. long live ops.
 
The service mesh: resilient communication for microservice applications
The service mesh: resilient communication for microservice applicationsThe service mesh: resilient communication for microservice applications
The service mesh: resilient communication for microservice applications
 
Microservices: Why We Did It (and should you?)
Microservices: Why We Did It (and should you?) Microservices: Why We Did It (and should you?)
Microservices: Why We Did It (and should you?)
 
Renan Dias: Using Alexa to deploy applications to Kubernetes
Renan Dias: Using Alexa to deploy applications to KubernetesRenan Dias: Using Alexa to deploy applications to Kubernetes
Renan Dias: Using Alexa to deploy applications to Kubernetes
 
Alex Dias: how to build a docker monitoring solution
Alex Dias: how to build a docker monitoring solution Alex Dias: how to build a docker monitoring solution
Alex Dias: how to build a docker monitoring solution
 
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
 
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
 
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDutyAnatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
 
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
 
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
 
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
 
Zero Downtime Postgres Upgrades
Zero Downtime Postgres UpgradesZero Downtime Postgres Upgrades
Zero Downtime Postgres Upgrades
 
DOXLON November 2016: Facebook Engineering on cgroupv2
DOXLON November 2016: Facebook Engineering on cgroupv2DOXLON November 2016: Facebook Engineering on cgroupv2
DOXLON November 2016: Facebook Engineering on cgroupv2
 
DOXLON November 2016 - ELK Stack and Beats
DOXLON November 2016 - ELK Stack and Beats DOXLON November 2016 - ELK Stack and Beats
DOXLON November 2016 - ELK Stack and Beats
 
DOXLON November 2016 - Data Democratization Using Splunk
DOXLON November 2016 - Data Democratization Using SplunkDOXLON November 2016 - Data Democratization Using Splunk
DOXLON November 2016 - Data Democratization Using Splunk
 

Dernier

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

Service discovery and configuration management at TransferWise