SlideShare a Scribd company logo
1 of 63
Building Microservices
@ Squarespace
QCon New York 2017
Franklin Angulo
@feangulo
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
sqarespace-microservices
Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
INSERT IMAGE HERE
AGENDA
01
Microservice Framework
02
Organizational Changes
03
New Opportunities & Challenges
SERVICE CORE
Microservice Framework
Healthchecks
Service
Discovery
Contextual
Information
Structured
Logging
Metrics
API
Documentation
Distributed
Tracing
Dynamic
Configuration
Healthchecks
service:
name: taxation
version: 1.0
server:
port: 8080
management:
port: 8081
Healthchecks
http://taxation101.eqx.dal.prod.squarespace.net:8081/healthcheck
{
"status":"UP",
"taxation-core":{
"healthy":true
"message":"Service is running version TAX-459"
}
}
Service Discovery & Registration
Service BService A Service C
Service
Discovery
ConsulZookeeper
Service Discovery & Registration
Contextual Information
Client
v3.1
Taxation Service
Billing Service
Context IdClient Version
Client Source
Type
JaOLrH2O
Structured Logging
Taxation Service
GC LogsAccess LogsApplication Logs
Structured Logging
tail -f /data/logs/taxation-access.log
2017-03-22 07:24:45:026 GMT
thread=jetty-846
contextId=JaOLrH2O
contextSourceType=billing
clientVersion=taxation-client-3.1
level=INFO
class=AccessLog
ip=10.100.101.205
method=GET
uri=/api/1/taxation/rates
queryString=
httpVersion=HTTP/1.1
responseCode=200
responseTimeMs=39
responseSize=-1
logging.level: DEBUG
logging:
level:
org.springframework: INFO
com.squarespace.metrics.Graphite: "OFF"
directory: /data/logs
extension: .log
maxFileSize: 512MB
totalSizeCap: 8GB
maxHistory: 5
Metrics
graphite:
enabled: true
enableConsole: false
host: {{ graphite_host }}
port: {{ graphite_port }}
Metrics
http://taxation101.eqx.dal.prod.squarespace.net:8081/metrics
{
"mem":2210292,
"mem.free":831939,
"processors":2,
"threads":89,
"GET.api.1.taxation.tax-overrides.sourceTypes.admin.requests.snapshot.stdDev":0,
"GET.api.1.taxation.exemptions.externalId.requests.snapshot.99thPercentile":90,
"GET.api.1.taxation.exemptions.requests.oneMinuteRate":2.964393875E-314,
"GET.api.1.taxation.exemptions.externalId.requests.meanRate":1.4890452464986816,
"PUT.api.1.taxation.tax-overrides.id.decisions.requests.snapshot.98thPercentile":22,
"GET.api.1.taxation.vat-countries.list-results.sourceTypes.billing.requests.snapshot.p75":0
}
Metrics
Distributed Tracing
Dynamic Configuration
vars:
tracing_sample_rate:
prod: 0.2
stage: 1.0
qa1: 1.0
Dynamic Configuration
API Documentation
SERVICE CLIENT
Microservice Framework
Client-Side Load
Balancing
Latency & Fault
Tolerance
Client-Side
Caching
Asynchronous
Request
Execution
HTTP Request
Builders
Client-Side Load Balancing
Client Service X
Service X
Service X
Service
Discovery
Application Container
Latency & Fault Tolerance
Service B
Service A
Service C
Service A Client
Service B Client
Service C Client
User
Request
Application Container
Latency & Fault Tolerance
Service B
Service A
Service C
Service A Client
10 Threads
Service B Client
5 Threads
Service C Client
5 Threads
User
Request
Fail fast, fail silent, or fallback
Application Container
Hystrix
Client-Side Caching
Service XService X Client
User
Request
Application Container
Asynchronous Request Execution
Client
Service A
Service Z
Application Container
Service B
Service C
Service D
HTTP Request Builders
getCurrentProductOfferingTemplate = group
.newTemplateBuilder(“getCurrentProductOffering”)
.withMethod(HttpMethod.GET.name())
.withUriTemplate(RESOURCE_URL + “/offerings/countries/{country}/current”)
.build();
ORGANIZATIONAL
CHANGES
Squarespace Engineering @ 2013
Server Systems Product & Data
Squarespace Engineering @ 2014
Server TechOpsSRE Core Svcs
Location TaxationBilling
Currency
The First Services
Provisioning
Provisioning
● Cobbler
● IP Plan
● DNS
● LDAP
● YUM
● NTP
Ansible & Configuration Management
Release
Engineering /
Developer
Productivity
Release Engineering & Developer Productivity
Drone
Helm
Ansible & Configuration Management
hello-service/deploy/deploy.yml:
Ansible & Configuration Management
hello-service/deploy/config.yml.j2:
Build & Deploy Tooling
Observability
& Alerting
Observability & Alerting
Observability & Alerting Tooling
Observability & Alerting Tooling
Observability & Alerting Tooling
Observability & Alerting Tooling
Observability & Alerting Tooling
Service Dashboard
NEW
OPPORTUNITIES
AND CHALLENGES
FUTURE WORK
Self-service provisioning
Code generation
Pull-based metrics
Log collection improvements
Distributed tracing improvements
Alerting improvements
Microservices Journey
2013: small (< 50 engineers)
build product & grow customer base
whatever works
2014: medium (< 100 engineers)
we have a lot of customers now!
whatever works doesn't work anymore
2016: large (100+ engineers)
architect for scalability and reliability
organizational structures
?: XL (200+ engineers)
QUESTIONS
Thank you!
squarespace.com/careers
Franklin Angulo
@feangulo
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
sqarespace-microservices

More Related Content

More from C4Media

More from C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Building Microservices @Squarespace