building microservices squarespace
play

Building Microservices @ Squarespace QCon New York 2017 INSERT - PowerPoint PPT Presentation

Franklin Angulo @feangulo Building Microservices @ Squarespace QCon New York 2017 INSERT IMAGE HERE AGENDA 01 Microservice Framework 02 Organizational Changes 03 New Opportunities & Challenges Service Contextual Healthchecks Discovery


  1. Franklin Angulo @feangulo Building Microservices @ Squarespace QCon New York 2017

  2. INSERT IMAGE HERE

  3. AGENDA 01 Microservice Framework 02 Organizational Changes 03 New Opportunities & Challenges

  4. Service Contextual Healthchecks Discovery Information SERVICE CORE Structured Distributed Metrics Logging Tracing Microservice Framework API Dynamic Documentation Configuration

  5. Healthchecks service: name: taxation version: 1.0 server: port: 8080 management: port: 8081

  6. Healthchecks http://taxation101.eqx.dal.prod.squarespace.net:8081/healthcheck { "status":"UP", "taxation-core":{ "healthy":true "message":"Service is running version TAX-459" } }

  7. Service Discovery & Registration Service A Service B Service C Service Discovery Zookeeper Consul

  8. Service Discovery & Registration

  9. Contextual Information Client Source Client Version Context Id Type Billing Service JaOLrH2O Client Taxation Service v3.1

  10. Structured Logging Taxation Service Application Logs Access Logs GC Logs

  11. Structured Logging tail -f /data/logs/taxation-access.log 2017-03-22 07:24:45:026 GMT thread=jetty-846 logging.level: DEBUG contextId=JaOLrH2O logging: contextSourceType=billing level: clientVersion=taxation-client-3.1 org.springframework: INFO level=INFO com.squarespace.metrics.Graphite: "OFF" class=AccessLog directory: /data/logs ip=10.100.101.205 extension: .log method=GET maxFileSize: 512MB uri=/api/1/taxation/rates totalSizeCap: 8GB queryString= maxHistory: 5 httpVersion=HTTP/1.1 responseCode=200 responseTimeMs=39 responseSize=-1

  12. Metrics graphite: enabled: true enableConsole: false host: {{ graphite_host }} port: {{ graphite_port }}

  13. 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 }

  14. Metrics

  15. Distributed Tracing

  16. Dynamic Configuration vars: tracing_sample_rate: prod: 0.2 stage: 1.0 qa1: 1.0

  17. Dynamic Configuration

  18. API Documentation

  19. Client-Side Load Latency & Fault Balancing Tolerance SERVICE CLIENT Asynchronous Client-Side Request Caching Execution Microservice Framework HTTP Request Builders

  20. Client-Side Load Balancing Application Container Service X Client Service X Service X Service Discovery

  21. Latency & Fault Tolerance Application Container Service A Service A Client User Service B Client Service B Request Service C Client Service C

  22. Latency & Fault Tolerance Application Container Service A Service A Client 10 Threads User Service B Client Service B Request 5 Threads Service C Client 5 Threads Service C Fail fast, fail silent, or fallback

  23. Hystrix

  24. Client-Side Caching Application Container User Service X Client Service X Request

  25. Asynchronous Request Execution Service B Application Container Service A Service C Service D Client Service Z

  26. HTTP Request Builders getCurrentProductOfferingTemplate = group .newTemplateBuilder( “getCurrentProductOffering” ) .withMethod(HttpMethod. GET .name()) .withUriTemplate(RESOURCE_URL + “/offerings/countries/{country}/current” ) .build();

  27. ORGANIZATIONAL CHANGES

  28. Squarespace Engineering @ 2013 Server Systems Product & Data

  29. Squarespace Engineering @ 2014 SRE Server Core Svcs TechOps

  30. The First Services Taxation Location Billing Currency

  31. Provisioning ● Cobbler IP Plan ● ● DNS Provisioning ● LDAP ● YUM NTP ●

  32. Ansible & Configuration Management

  33. Release Engineering & Developer Productivity Helm Drone Release Engineering / Developer Productivity

  34. Ansible & Configuration Management hello-service/deploy/deploy.yml:

  35. Ansible & Configuration Management hello-service/deploy/config.yml.j2:

  36. Build & Deploy Tooling

  37. Observability & Alerting Observability & Alerting

  38. Observability & Alerting Tooling

  39. Observability & Alerting Tooling

  40. Observability & Alerting Tooling

  41. Observability & Alerting Tooling

  42. Observability & Alerting Tooling

  43. Service Dashboard

  44. NEW OPPORTUNITIES AND CHALLENGES

  45. FUTURE WORK Self-service provisioning Code generation Pull-based metrics Log collection improvements Distributed tracing improvements Alerting improvements

  46. Microservices Journey 2013: small (< 50 engineers) 2016: large (100+ engineers) build product & grow customer base architect for scalability and reliability whatever works organizational structures 2014: medium (< 100 engineers) ?: XL (200+ engineers) we have a lot of customers now! whatever works doesn't work anymore

  47. QUESTIONS Thank you! Franklin Angulo @feangulo squarespace.com/careers

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend