Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Making Friendly Microservices
Michele
Titolo
Lead Software Engineer,
Capital One
Definition:
/microservice/
Small service that does one thing well

Independent

Owns its own data
Definition:
/friendly/
Helpful 

An ally

Kind

Easy to use, understand

Able to coexist without causing harm
What Makes A
Microservice…
Helpful, An Ally, Kind, Easy to Use, 

Able to Coexist
Why?
Helpful
Documentation
Documentation
Documentation
Version And
Revision History
Historical record of when things changed
and why
Live Documentation
Document
Dependencies
Create A
Dependency Graph
Autogenerate
Documentation
Tools
Open API Specification/Swagger

APIBlueprint

RAML
Open Api Spec
Api Blueprint
RAML
Ally
Integrate
Monitoring Tools
Log All The Things
Use unique request IDs so logs are easier
to sort through
Avoid Playing
Red Light Green Light
What Happens When
A Dependency Fails?
Hint:
Your Service Should
Not Go Down
Macro Dependencies
Micro Dependencies
Help Identify
Bottlenecks
Before They Happen
Communication
Gather Data
Tools
Docker

Atlas

Zipkin
Docker
Atlas
Zipkin
Kind
Make Your Service
Easy To Deploy
And Scale
Consumers Should Be
Able To Hit The API
Directly In A Non-Prod
Environment
Consistent Error
Messaging
HTTP/1.1
206 Partial Content
Do Not Make Others
Setup A Development
Environment To
Troubleshoot Issues
Tools
Docker

Jenkins

Capistrano
Docker
Containers
Each service should stand alone

Use docker-compose for dependencies 

Swarm and Scale
Use Containers
For Local
Development
Jenkins
Capistrano
Easy To Use
Use One Base URL
For Everything
Use An API Gateway
Or Load Balancer To
Route API Calls
Be Security
Conscious
Cookie Security
Don’t use wildcards

Always use HTTPS and Secure

Set correct domain
Mobile Security
SSL Certificate Pinning
Tools
Docker

Zuul

NGINIX

HAProxy
Docker
Zuul
NGINIX
HAProxy
Coexist
Consistency
Conventions
How Does Your
Service Fit In With
The Rest?
Services Need To
Work Together
Don’t Take Single
Responsibility
Too Far
Assumptions
Tools
Microservice
Discovery
API Discovery
The Friendly
Microservice
Helpful Documentation

Built With Monitoring And Troubleshooting In Mind

Easily Deployable

Eas...
Thank you!
@micheletitolo
Resources
• https://opencredo.com/rest-api-tooling-review/

• http://www.capitalone.io/blog/delivering-microservices-for-e...
Photo Credits
• https://unsplash.com/photos/h13Y8vyIXNU

• https://unsplash.com/collections/380/petunia-the-pug

• https:/...
Making friendly-microservices
Making friendly-microservices
Making friendly-microservices
Upcoming SlideShare
Loading in …5
×

Making friendly-microservices

826 views

Published on

Small is the new big, and for good reason. The benefits of microservices and service-oriented architecture have been extolled for a number of years, yet many forge ahead without thinking of the impact the users of the services. Consuming on micro services can be enjoyable as long as the developer experience has been crafted as finely as the service itself. But just like with any other product, there isn’t a single kind of consumer. Together we will walk through some typical kinds of consumers, what their needs are, and how we can create a great developer experience using brains and tools like Docker.

Published in: Software
  • Be the first to comment

Making friendly-microservices

  1. 1. Making Friendly Microservices Michele Titolo Lead Software Engineer, Capital One
  2. 2. Definition: /microservice/ Small service that does one thing well Independent Owns its own data
  3. 3. Definition: /friendly/ Helpful An ally Kind Easy to use, understand Able to coexist without causing harm
  4. 4. What Makes A Microservice… Helpful, An Ally, Kind, Easy to Use, Able to Coexist
  5. 5. Why?
  6. 6. Helpful
  7. 7. Documentation Documentation Documentation
  8. 8. Version And Revision History Historical record of when things changed and why
  9. 9. Live Documentation
  10. 10. Document Dependencies
  11. 11. Create A Dependency Graph
  12. 12. Autogenerate Documentation
  13. 13. Tools Open API Specification/Swagger APIBlueprint RAML
  14. 14. Open Api Spec
  15. 15. Api Blueprint
  16. 16. RAML
  17. 17. Ally
  18. 18. Integrate Monitoring Tools
  19. 19. Log All The Things Use unique request IDs so logs are easier to sort through
  20. 20. Avoid Playing Red Light Green Light
  21. 21. What Happens When A Dependency Fails?
  22. 22. Hint: Your Service Should Not Go Down
  23. 23. Macro Dependencies Micro Dependencies
  24. 24. Help Identify Bottlenecks Before They Happen
  25. 25. Communication
  26. 26. Gather Data
  27. 27. Tools Docker Atlas Zipkin
  28. 28. Docker
  29. 29. Atlas
  30. 30. Zipkin
  31. 31. Kind
  32. 32. Make Your Service Easy To Deploy And Scale
  33. 33. Consumers Should Be Able To Hit The API Directly In A Non-Prod Environment
  34. 34. Consistent Error Messaging
  35. 35. HTTP/1.1 206 Partial Content
  36. 36. Do Not Make Others Setup A Development Environment To Troubleshoot Issues
  37. 37. Tools Docker Jenkins Capistrano
  38. 38. Docker
  39. 39. Containers Each service should stand alone Use docker-compose for dependencies Swarm and Scale
  40. 40. Use Containers For Local Development
  41. 41. Jenkins
  42. 42. Capistrano
  43. 43. Easy To Use
  44. 44. Use One Base URL For Everything
  45. 45. Use An API Gateway Or Load Balancer To Route API Calls
  46. 46. Be Security Conscious
  47. 47. Cookie Security Don’t use wildcards Always use HTTPS and Secure Set correct domain
  48. 48. Mobile Security SSL Certificate Pinning
  49. 49. Tools Docker Zuul NGINIX HAProxy
  50. 50. Docker
  51. 51. Zuul
  52. 52. NGINIX
  53. 53. HAProxy
  54. 54. Coexist
  55. 55. Consistency Conventions
  56. 56. How Does Your Service Fit In With The Rest?
  57. 57. Services Need To Work Together
  58. 58. Don’t Take Single Responsibility Too Far
  59. 59. Assumptions
  60. 60. Tools
  61. 61. Microservice Discovery
  62. 62. API Discovery
  63. 63. The Friendly Microservice Helpful Documentation Built With Monitoring And Troubleshooting In Mind Easily Deployable Easy To Consume Coexists With Established Conventions
  64. 64. Thank you! @micheletitolo
  65. 65. Resources • https://opencredo.com/rest-api-tooling-review/ • http://www.capitalone.io/blog/delivering-microservices-for-enterprise-with-devops/ • https://medium.com/capital-one-developers/mobile-orchestration-innovation-on- the-edge-9835e4cbd69e#.vpbsiyqmq • http://swagger.io/open-source-integrations/ • https://en.wikipedia.org/wiki/List_of_HTTP_status_codes • https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OTG-SESS-002) • http://www.onegeek.com.au/articles/waiting-for-dependencies-in-docker-compose • http://techblog.netflix.com/2014/12/introducing-atlas-netflixs-primary.html • https://github.com/justone/dockviz
  66. 66. Photo Credits • https://unsplash.com/photos/h13Y8vyIXNU • https://unsplash.com/collections/380/petunia-the-pug • https://www.flickr.com/photos/32179495@N04/21211072432/ • https://www.flickr.com/photos/78134717@N08/7154609638 • https://www.flickr.com/photos/33622296@N04/5870006633/ • https://www.flickr.com/photos/7255089@N05/5415983081 • https://www.flickr.com/photos/95477820@N02/8730925814 • https://www.flickr.com/photos/35137530@N00/16406998986/

×