Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API Versioning for Zero Downtime | Devoxx Belgi...

Avatar for Patrice Patrice
November 08, 2017

API Versioning for Zero Downtime | Devoxx Belgium 2017

Avatar for Patrice

Patrice

November 08, 2017
Tweet

More Decks by Patrice

Other Decks in Programming

Transcript

  1. API Versioning for Zero Downtime Patrice Krakow | ING |

    Lead Architect | APIs Devoxx Belgium 2017 Antwerp | 2017, November 8 (3.10.0)
  2. We want to be a tech company with a banking

    license! Ralph Hamers, CEO and chairman Executive Board ING Group source: https://www.ing.com/Newsroom/All-news/We-want-to-be-a-tech-company-with-a-banking-license-Ralph-Hamers.htm
  3. Patrice Krakow 10 Nordic API 2017 | A Journey from

    API Versioning to Canary Release https://youtu.be/Yke6Vut2Shc
  4. Patrice Krakow 11 • Sep 2016 – Present • ING

    | Lead Architect of the API Platform • Jul 2012 – Aug 2016 • ING Belgium | SOA Architect • Jun 2012 – Apr 2013 • Eligible | Co-founder • Aug 2001 – Jun 2012 • SCA Package (DS Smith) | System Integration Coordinator … • Sep 1990 – Jun 1995 • University of Liège | Master of Physics Nordic API 2017 | A Journey from API Versioning to Canary Release https://youtu.be/Yke6Vut2Shc
  5. Patrice Krakow 12 • Sep 2016 – Present • ING

    | Lead Architect of the API Platform • Jul 2012 – Aug 2016 • ING Belgium | SOA Architect • Jun 2012 – Apr 2013 • Eligible | Co-founder • Aug 2001 – Jun 2012 • SCA Package (DS Smith) | System Integration Coordinator … • Sep 1990 – Jun 1995 • University of Liège | Master of Physics EDIFACT X12 SGML CORBA DCOM XML WS SOA ESB REST APIs
  6. Why API Versioning? 13 “Many API designers include versioning information

    (e.g., numbers in the URL, HTTP headers, or response body) without much thought about the assumption behind that practice.” RESTful Web Clients by Mike Amundsen How?
  7. Why API Versioning? 14 “Many API designers include versioning information

    (e.g., numbers in the URL, HTTP headers, or response body) without much thought about the assumption behind that practice.” RESTful Web Clients by Mike Amundsen How? @mamund
  8. Why API Versioning? 15 2nd How? 1st Why? “Many API

    designers include versioning information (e.g., numbers in the URL, HTTP headers, or response body) without much thought about the assumption behind that practice.” RESTful Web Clients by Mike Amundsen
  9. Why API Versioning? 16 2nd How? 1st Why? Versioning =

    Handling change over time “Many API designers include versioning information (e.g., numbers in the URL, HTTP headers, or response body) without much thought about the assumption behind that practice.” RESTful Web Clients by Mike Amundsen
  10. Why API Versioning? 19 want to change their APIs as

    soon as they have a new brilliant idea API Consumers API Providers
  11. Why API Versioning? 20 want to change their APIs as

    soon as they have a new brilliant idea want the APIs they are using to stay stable as long as they are not interested by the new brilliant ideas of the API Providers! API Consumers API Providers
  12. Why API Versioning? 21 What!? API Consumers API Providers want

    to change their APIs as soon as they have a new brilliant idea want the APIs they are using to stay stable as long as they are not interested by the new brilliant ideas of the API Providers!
  13. Why API Versioning? 22 API Versioning API Consumers API Providers

    want to change their APIs as soon as they have a new brilliant idea want the APIs they are using to stay stable as long as they are not interested by the new brilliant ideas of the API Providers!
  14. Why API Versioning? 23 DON’T API Consumers API Providers want

    to change their APIs as soon as they have a new brilliant idea want the APIs they are using to stay stable as long as they are not interested by the new brilliant ideas of the API Providers!
  15. • API is a set of API endpoints. • API

    endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 27 Meta-Model and Terminology for APIs Service API
  16. • API is a set of API endpoints. • API

    endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 28 Meta-Model and Terminology for APIs Service API
  17. • API is a set of API endpoints. • API

    endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 29 Meta-Model and Terminology for APIs API endpoint Service API
  18. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 30 Meta-Model and Terminology for APIs API endpoint Service API 1 0..n
  19. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 31 Meta-Model and Terminology for APIs API endpoint API specification Service API 1 0..n 1 1
  20. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 32 Meta-Model and Terminology for APIs API endpoint API specification Service API 1 0..n 1 1 1 1..n
  21. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 33 Meta-Model and Terminology for APIs API endpoint API specification Service API 1 0..n 1 1 1 1..n 1
  22. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 34 Meta-Model and Terminology for APIs API endpoint API specification Service Service version API 1 0..n 1 1 1 1..n 1 1 0..n
  23. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 35 Meta-Model and Terminology for APIs API endpoint API specification Service Service version Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n
  24. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 36 Meta-Model and Terminology for APIs API endpoint API specification Service Service version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n
  25. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 37 Meta-Model and Terminology for APIs API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n
  26. Semantic Versioning is a de-facto standard way – proposed by

    Tom Preston-Werner, co- founder of GitHub – to format version numbers of software packages. You can find the full specification at http://semver.org/. Semantic Versioning for both API Specifications and Services 38
  27. Semantic Versioning is a de-facto standard way – proposed by

    Tom Preston-Werner, co- founder of GitHub – to format version numbers of software packages. You can find the full specification at http://semver.org/. MAJOR.MINOR.PATCHor X.Y.Z where X, Y and Z are non-negative integers 1. MAJOR version when you make incompatible API changes, 2. MINOR version when you add functionality in a backwards-compatible manner, and 3. PATCH version when you make backwards-compatible bug fixes. Semantic Versioning for both API Specifications and Services 39
  28. Semantic Versioning is a de-facto standard way – proposed by

    Tom Preston-Werner, co- founder of GitHub – to format version numbers of software packages. You can find the full specification at http://semver.org/. MAJOR.MINOR.PATCHor X.Y.Z where X, Y and Z are non-negative integers 1. MAJOR version when you make incompatible API changes, 2. MINOR version when you add functionality in a backwards-compatible manner, and 3. PATCH version when you make backwards-compatible bug fixes. Software using Semantic Versioning MUST declare a public API. This API could be declared in the code itself or exist strictly in documentation. However it is done, it should be precise and comprehensive. Semantic Versioning for both API Specifications and Services 40
  29. Semantic Versioning is a de-facto standard way – proposed by

    Tom Preston-Werner, co- founder of GitHub – to format version numbers of software packages. You can find the full specification at http://semver.org/. MAJOR.MINOR.PATCHor X.Y.Z where X, Y and Z are non-negative integers 1. MAJOR version when you make incompatible API changes, 2. MINOR version when you add functionality in a backwards-compatible manner, and 3. PATCH version when you make backwards-compatible bug fixes. Software using Semantic Versioning MUST declare a public API. This API could be declared in the code itself or exist strictly in documentation. However it is done, it should be precise and comprehensive. Swagger/OpenAPI 2.0 specification – https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md Semantic Versioning for both API Specifications and Services 41
  30. 10. Patch version Z(a) (x(a).y(a).Z(a) | x(a) > 0) of

    the Swagger/OpenAPI file MUST be incremented if changes that do not require any services implementing the API to be changed, are introduced. 11. Patch version Z(s) (x(s).y(s).Z(s) | x(s) > 0) of a service MUST be incremented if only backwards compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior and MUST NOT require any changes to the Swagger/OpenAPI file. The patch version Z(s) of a service MUST NOT be constrained by the patch version Z(a) of the Swagger/OpenAPI file, and vice-versa. 12. Minor version Y(a) (x(a).Y(a).z(a) | x(a) > 0) of the Swagger/OpenAPI file MUST be incremented if new, backwards compatible functionality is introduced to the API. It MUST be incremented if any API functionality is marked as deprecated. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented. 13. Minor version Y(s) (x(s).Y(s).z(s) | x(s) > 0) of a service MUST be incremented, together with the Swagger/OpenAPI file one, if new, backwards compatible functionality is introduced by the API changes. It MUST NOT be incremented if the minor version of the Swagger/OpenAPI file is not incremented. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented. The minor version Y(s) of a service MUST always be less than or equal to the minor version Y(a) of the Swagger/OpenAPI file, Y(s) ≤ Y(a). Semantic Versioning for both API Specifications and Services 42
  31. 10. Patch version Z(a) (x(a).y(a).Z(a) | x(a) > 0) of

    the Swagger/OpenAPI file MUST be incremented if changes that do not require any services implementing the API to be changed, are introduced. 11. Patch version Z(s) (x(s).y(s).Z(s) | x(s) > 0) of a service MUST be incremented if only backwards compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior and MUST NOT require any changes to the Swagger/OpenAPI file. The patch version Z(s) of a service MUST NOT be constrained by the patch version Z(a) of the Swagger/OpenAPI file, and vice-versa. 12. Minor version Y(a) (x(a).Y(a).z(a) | x(a) > 0) of the Swagger/OpenAPI file MUST be incremented if new, backwards compatible functionality is introduced to the API. It MUST be incremented if any API functionality is marked as deprecated. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented. 13. Minor version Y(s) (x(s).Y(s).z(s) | x(s) > 0) of a service MUST be incremented, together with the Swagger/OpenAPI file one, if new, backwards compatible functionality is introduced by the API changes. It MUST NOT be incremented if the minor version of the Swagger/OpenAPI file is not incremented. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented. The minor version Y(s) of a service MUST always be less than or equal to the minor version Y(a) of the Swagger/OpenAPI file, Y(s) ≤ Y(a). Semantic Versioning for both API Specifications and Services 43
  32. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 44 Meta-Model and Terminology for APIs API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n
  33. Our Journey to Zero Downtime 49 Meta-Model and Terminology for

    APIs API Gateway API Service Discovery API Registry
  34. Our Journey to Zero Downtime 50 Meta-Model and Terminology for

    APIs API Gateway API Service Discovery API Registry
  35. Our Journey to Zero Downtime 51 Meta-Model and Terminology for

    APIs API Gateway API Service Discovery Routing API Registry
  36. Our Journey to Zero Downtime 52 Meta-Model and Terminology for

    APIs API Gateway API Service Discovery Routing Canary Release API Registry
  37. Our Journey to Zero Downtime 53 Meta-Model and Terminology for

    APIs Zero Downtime API Gateway API Service Discovery Routing Canary Release API Registry
  38. Our Journey to Zero Downtime 54 Meta-Model and Terminology for

    APIs API Gateway API Service Discovery Routing Canary Release Zero Downtime API Registry
  39. API Gateway 62 Outside Inside Office API Gateway on the

    external edge API Gateway on the internal edge
  40. API Service Discovery and Client-Side Load Balancing 67 API Service

    Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  41. API Service Discovery and Client-Side Load Balancing 68 Service~1 API

    Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  42. API Service Discovery and Client-Side Load Balancing 69 Instance of

    Service~1 10.0.0.1:9001 API Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  43. API Service Discovery and Client-Side Load Balancing 70 Instance of

    Service~1 10.0.0.1:9001 API Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  44. API Service Discovery and Client-Side Load Balancing 72 Instance of

    Service~1 10.0.0.1:9001 API Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  45. API Service Discovery and Client-Side Load Balancing 73 Instance of

    Service~1 10.0.0.1:9001 API Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  46. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 74 Instance of Service~1 10.0.0.1:9001 API Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  47. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/accounts" } API Service Discovery and Client-Side Load Balancing 75 Instance of Service~1 10.0.0.1:9001 API Service Discovery { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  48. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 76 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } Instance of Service~1 10.0.0.1:9001 API Service Discovery
  49. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } API Service Discovery and Client-Side Load Balancing 77 { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } Instance of Service~1 10.0.0.1:9001 API Service Discovery
  50. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 78 Instance of Service~1 10.0.0.1:9001 API Service Discovery
  51. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 79 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 API Service Discovery
  52. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 80 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 API Service Discovery
  53. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 81 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery
  54. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 82 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery
  55. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 83 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery
  56. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 84 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery
  57. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 85 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 API Service Discovery
  58. Router Logical Address Physical Address { "method": “get", "host": “api.ing.com",

    "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 86 Instance of Service~1 10.0.0.1:9001 Instance of Application~1 Instance of Service~1 10.0.0.2:9001 API Service Discovery { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" }
  59. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.2:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 87 Router Instance of Service~1 Instance of Service~1 10.0.0.1:9001 10.0.0.2:9001 Instance of Application~1 API Service Discovery { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" }
  60. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.2:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 88 Router Instance of Service~1 Instance of Service~1 10.0.0.1:9001 10.0.0.2:9001 Instance of Application~1 API Service Discovery
  61. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.2:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 89 Router Instance of Service~1 10.0.0.2:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery Instance of Service~1 10.0.0.1:9001
  62. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.2:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 90 Router Instance of Service~1 10.0.0.2:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery Instance of Service~1 10.0.0.1:9001
  63. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.2:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 91 Router Instance of Service~1 10.0.0.2:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery Instance of Service~1 10.0.0.1:9001
  64. Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate":

    “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.2:9001", "urlPathTemplate": “/accounts" } API Service Discovery and Client-Side Load Balancing 92 Router Instance of Service~1 10.0.0.2:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery Instance of Service~1 10.0.0.1:9001
  65. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" } API Service Discovery and Client-Side Load Balancing 93 Router Instance of Service~1 10.0.0.2:9001 Instance of Application~1 { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } API Service Discovery Instance of Service~1 10.0.0.1:9001
  66. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" } API Service Discovery and Client-Side Load Balancing 94
  67. API Service Discovery and Client-Side Load Balancing 95 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  68. API Service Discovery and Client-Side Load Balancing 96 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  69. API Service Discovery and Client-Side Load Balancing 97 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  70. API Service Discovery and Client-Side Load Balancing 98 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  71. API Service Discovery and Client-Side Load Balancing 99 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  72. API Service Discovery and Client-Side Load Balancing 100 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  73. API Service Discovery and Client-Side Load Balancing 101 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/accounts" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } { "method": "get", "host": "10.0.0.2:9001", "urlPathTemplate": "/accounts" }
  74. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! • Service version is a version of a service. • Instance is a running process of a service version. As the running processes are addressable on TCP/IP network, you can call them via a socket identified by an IP address and a TCP port. 105 API Service Discovery and Client-Side Load Balancing API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n
  75. • API is a set of API endpoints that share

    a common purpose. • API endpoint is an interface; when using HTTP, an API endpoint is identified by the triplet {HTTP method, host, URL Path Template}. • API specification is a precise and comprehensive documentation of the API endpoints part of the API. We use the OpenAPI/Swagger standard. • Service is a piece of software, a piece of code, to be run in an out-of- process component, so it cannot be a library! 106 API Service Discovery and Client-Side Load Balancing API endpoint Service 1 1..n API 1 0..n 1
  76. { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method":

    "get", "host": "api.ing.com", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 108
  77. API Service Discovery and Client-Side Load Balancing 109 Service~2 Service~1

    { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" }
  78. API Service Discovery and Client-Side Load Balancing 110 Instance of

    Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" }
  79. API Service Discovery and Client-Side Load Balancing 111 Instance of

    Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" } Logical Address Physical Address { "method": “get", "host": “api.ing.com", "urlPathTemplate": “/accounts" } { "method": “get", "host": “10.0.0.1:9001", "urlPathTemplate": “/accounts" } API Service Discovery
  80. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 112 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" } API Service Discovery
  81. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 113 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" } API Service Discovery
  82. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 114 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery
  83. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 115 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1
  84. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 116 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "get", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  85. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 117 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "get", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  86. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 118 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "get", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  87. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 119 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "get", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  88. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 120 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "get", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  89. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 121 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "post", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  90. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 122 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "post", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  91. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 123 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "post", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  92. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 124 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 { "method": "post", "host": “api.ing.com", "urlPathTemplate": “/payments" }
  93. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 125 Instance of Service~2 10.0.0.2:9001 Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1
  94. Logical Address Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate":

    "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payments" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } API Service Discovery and Client-Side Load Balancing 126
  95. API Service Discovery and Client-Side Load Balancing 127 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payment" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" }
  96. API Service Discovery and Client-Side Load Balancing 128 Logical Address

    Physical Address { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "get", "host": "10.0.0.1:9001", "urlPathTemplate": "/payment" } { "method": "post", "host": "api.ing.com", "urlPathTemplate": "/payments" } { "method": "post", "host": "10.0.0.2:9001", "urlPathTemplate": "/payments" } DNS
  97. In particular, [Baker Street] creates a simpler management model: there

    is a 1:1 mapping between a microservice instance and local load balancer (no central load balancer required!), which means every microservice can be configured and set up in exactly the same way using a default configuration that works for most services. In addition, the distributed architecture exhibits linear scale: each new microservice instance adds new load balancing capacity. Thus, the system is self-provisioning and automatically provides the capacity needed to handle the available instances of a service. Finally, by storing availability information locally with each load balancer instance, [Baker Street] ensures that all active microservice instances can still route traffic, even if some instances of the microservice or instances of [Baker Street] components. Source: https://thenewstack.io/baker-street-avoiding-bottlenecks-with-a-client-side-load-balancer-for-microservices/ API Service Discovery and Client-Side Load Balancing 135
  98. API Registry 148 { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts"

    } Swagger 2.0 OpenAPI/Swagger 2.0 https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
  99. API Registry 149 { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts"

    } swagger: '2.0' info: title: Account Information API version: 1.0.1 host: api.ing.com basePath: / schemes: - https consumes: - application/json produces: - application/json paths: /accounts: get: parameters: - ...
  100. API Registry 150 { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts"

    } swagger: '2.0' info: title: Account Information API version: 1.0.1 host: api.ing.com basePath: / schemes: - https consumes: - application/json produces: - application/json paths: /accounts: get: parameters: - ... API Registry
  101. API Registry 151 Router Instance of Service~1 10.0.0.1:9001 Instance of

    Application~1 API Service Discovery API Registry
  102. API Registry 152 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 API Registry
  103. API Registry 153 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 API Registry
  104. API Registry 154 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 API Provider API Registry
  105. API Registry 155 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 API Provider API Consumer API Registry
  106. API Registry 156 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 API Provider API Consumer API Registry
  107. API Registry 157 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 Is this service allowed to implement this API endpoint? API Provider API Consumer API Registry
  108. API Registry 158 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 Is this service allowed to implement this API endpoint? Is this application allowed to call this API endpoint? API Provider API Consumer API Registry
  109. API Registry 159 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 Manifest Is this application allowed to call this API endpoint? API Registry API Provider API Consumer
  110. API Registry 160 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 Manifest Subscription API Registry API Provider API Consumer
  111. API Registry 161 Router Instance of Application~1 API Service Discovery

    Instance of Service~1 10.0.0.1:9001 Manifest (Subscription) Peer-Token API Registry API Provider API Consumer
  112. Within our organization, we want to control which service is

    implementing which part of an API. The Manifest 162 API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API
  113. Within our organization, we want to control which service is

    implementing which part of an API. We can implement this control by creating a structure making an explicit link between a service and a list of API endpoints part of an API. We will call such a structure our manifest. The Manifest 163 API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API Manifest
  114. Within our organization, we want to control which service is

    implementing which part of an API. We can implement this control by creating a structure making an explicit link between a service and a list of API endpoints part of an API. We will call such a structure our manifest. When we generate a manifest, we store/remember the version of the API specificationthat documents API endpoint at the moment the manifest is generated. The Manifest 164 API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API Manifest
  115. { "serviceName": "<Name of the Service>", "endpoints": [ { "method":

    "<paths/{path}/get|post|put|patch|delete from Swagger/OpenAPI>", "host": "<host from Swagger/OpenAPI>", "urlPathTemplate": "<paths/{path} from Swagger/OpenAPI>", "apiSpecificationVersion": "<info/version from Swagger/OpenAPI>" }, ... ] } The Manifest 165
  116. { "serviceName": "<Name of the Service>", "endpoints": [ { "method":

    "<paths/{path}/get|post|put|patch|delete from Swagger/OpenAPI>", "host": "<host from Swagger/OpenAPI>", "urlPathTemplate": "<paths/{path} from Swagger/OpenAPI>", "apiSpecificationVersion": "<info/version from Swagger/OpenAPI>" }, ... ] } The Manifest 166 Service~1 { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" }
  117. { "serviceName": "Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com",

    "urlPathTemplate": "/accounts", "apiSpecificationVersion": “1.0.1" }, ... ] } The Manifest 167 Service~1 { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } swagger: '2.0' info: title: Account Information API version: 1.0.1 host: api.ing.com basePath: / schemes: - https consumes: - application/json produces: - application/json paths: /accounts: get: parameters: - ...
  118. When a software package wants to call an API endpoint,

    it has first to declare its intention to do so. Subscription and Peer-Token 169 API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API
  119. When a software package wants to call an API endpoint,

    it has first to declare its intention to do so. We call subscription this relation between the software package, called an application, and a specific API endpoint. Subscription and Peer-Token 170 API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API Subscription Application
  120. When a software package wants to call an API endpoint,

    it has first to declare its intention to do so. We call subscription this relation between the software package, called an application, and a specific API endpoint. When we generate a peer-token, we store/remember the version of the API specification that documents the API endpoint at the moment the subscription is created. Subscription and Peer-Token 172 API endpoint API specification Xa.Ya.Za Service Service version Xs.Ys.Zs Instance API (Subscription) Peer-Token Application
  121. { “applicationName": "<Name of the Application>", "endpoints": [ { "method":

    "<paths/{path}/get|post|put|patch|delete from Swagger/OpenAPI>", "host": "<host from Swagger/OpenAPI>", "urlPathTemplate": "<paths/{path} from Swagger/OpenAPI>", "apiSpecificationVersion": "<info/version from Swagger/OpenAPI>" }, ... ] } Subscription and Peer-Token 173
  122. { “applicationName": "<Name of the Application>", "endpoints": [ { "method":

    "<paths/{path}/get|post|put|patch|delete from Swagger/OpenAPI>", "host": "<host from Swagger/OpenAPI>", "urlPathTemplate": "<paths/{path} from Swagger/OpenAPI>", "apiSpecificationVersion": "<info/version from Swagger/OpenAPI>" }, ... ] } Subscription and Peer-Token 174 This is the exact same structure as the manifest ;-)
  123. { "applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com",

    "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.1" }, ... ] } Subscription and Peer-Token 176
  124. API Platform 181 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal
  125. API Platform 183 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal
  126. API Platform 184 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Service~1
  127. API Platform 185 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Service~1 Manifest Manifest
  128. API Platform 186 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Service~1 Manifest Manifest
  129. API Platform 187 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Service~1 Manifest Manifest Service version Xs.Ys.Zs 1 0..n
  130. API Platform 188 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Service~1 Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider
  131. API Platform 189 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001
  132. API Platform 190 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001
  133. API Platform 191 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery
  134. API Platform 192 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 API Consumer
  135. API Platform 193 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 API Consumer
  136. API Platform 194 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 API Consumer Peer-Token (Subscription) Peer-Token Application
  137. API Platform 195 API endpoint API specification Xa.Ya.Za API 1

    0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery Router Instance of Application~1 API Consumer Peer-Token (Subscription) Peer-Token Application
  138. Router API Platform 196 API endpoint API specification Xa.Ya.Za API

    1 0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery Instance of Application~1 API Consumer Peer-Token (Subscription) Peer-Token Application API SDK
  139. Router API Platform 197 API endpoint API specification Xa.Ya.Za API

    1 0..n 1 1 API Registry API Developer Portal Service 1 1..n Manifest Manifest Service version Xs.Ys.Zs 1 0..n API Provider Instance 1 0..n Instance of Service~1 10.0.0.1:9001 API Service Discovery Instance of Application~1 API Consumer Peer-Token (Subscription) Peer-Token Application API SDK SDK
  140. API Platform 198 API endpoint API specification Xa.Ya.Za Service Service

    version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n Router Instance of Application~1 API Service Discovery Instance of Service~1 10.0.0.1:9001 API Provider API Consumer API Registry API Developer Portal API SDK SDK Peer-Token Manifest (Subscription) Peer-Token Application Manifest
  141. Routing Conjecture 200 API endpoint API specification Xa.Ya.Za Service Service

    version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n Router Instance of Application~1 API Service Discovery Instance of Service~1 10.0.0.1:9001 API Provider API Consumer API Registry API Developer Portal API SDK SDK Peer-Token Manifest (Subscription) Peer-Token Application Manifest
  142. Routing Conjecture 201 API endpoint API specification Xa.Ya.Za Service Service

    version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n Router Instance of Application~1 API Service Discovery Instance of Service~1 10.0.0.1:9001 API Provider API Consumer API Registry API Developer Portal API SDK SDK Peer-Token Manifest (Subscription) Peer-Token Application Manifest
  143. Routing Conjecture 202 API endpoint API specification Xa.Ya.Za Service Service

    version Xs.Ys.Zs Instance API 1 0..n 1 1 1 1..n 1 1 0..n 1 0..n Router Instance of Application~1 API Service Discovery Instance of Service~1 10.0.0.1:9001 API Provider API Consumer API Registry API Developer Portal API SDK SDK Peer-Token Manifest (Subscription) Peer-Token Application Manifest
  144. The canary release is a technique to reduce the risk

    of introducing a new software version in production by slowly rolling out the change to a small subset of users before making it available to everybody. Canary Release 203
  145. The canary release is a technique to reduce the risk

    of introducing a new software version in production by slowly rolling out the change to a small subset of users before making it available to everybody. The name for this technique originates from miners who would carry a canary in a cage down the coal mines. If toxic gases leaked into the mine, it would kill the canary before killing the miners. A canary release provides a similar form of early warning for potential problems before impacting your user base. Canary Release 204 Source: https://martinfowler.com/bliki/CanaryRelease.html
  146. We can now implement the Canary Release, but let’s be

    careful Application (API Specification x.Y.z)  (Yes) API endpoint (API Specification x.Y.z) Application (API Specification x.Y.z)  (Yes) API endpoint (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (Yes) API endpoint (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (No) API endpoint (API Specification x.Y.z) But, we can handle that by building the routing rules with information form both the API Registry and the API Service Discovery ;-) Routing 211
  147. We can now implement the Canary Release, but let’s be

    careful 1. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y.z) Application (API Specification x.Y.z)  (Yes) API endpoint (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (Yes) API endpoint (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (No) API endpoint (API Specification x.Y.z) But, we can handle that by building the routing rules with information form both the API Registry and the API Service Discovery ;-) Routing 212
  148. We can now implement the Canary Release, but let’s be

    careful 1. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y.z) 2. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (Yes) API endpoint (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (No) API endpoint (API Specification x.Y.z) But, we can handle that by building the routing rules with information form both the API Registry and the API Service Discovery ;-) Routing 213
  149. We can now implement the Canary Release, but let’s be

    careful 1. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y.z) 2. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y+1.z) 3. Application (API Specification x.Y+1.z)  (Yes) service (API Specification x.Y+1.z) Application (API Specification x.Y+1.z)  (No) API endpoint (API Specification x.Y.z) But, we can handle that by building the routing rules with information form both the API Registry and the API Service Discovery ;-) Routing 214
  150. We can now implement the Canary Release, but let’s be

    careful 1. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y.z) 2. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y+1.z) 3. Application (API Specification x.Y+1.z)  (Yes) service (API Specification x.Y+1.z) 4. Application (API Specification x.Y+1.z)  (No) service (API Specification x.Y.z) But, we can handle that by building the routing rules with information form both the API Registry and the API Service Discovery ;-) Routing 215
  151. We can now implement the Canary Release, but let’s be

    careful 1. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y.z) 2. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y+1.z) 3. Application (API Specification x.Y+1.z)  (Yes) service (API Specification x.Y+1.z) 4. Application (API Specification x.Y+1.z)  (No) service (API Specification x.Y.z) But, we can handle that by building the routing rules with information form both the API Registry and the API Service Discovery ;-) Routing 216
  152. We can now implement the Canary Release, but let’s be

    careful 1. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y.z) 2. Application (API Specification x.Y.z)  (Yes) service (API Specification x.Y+1.z) 3. Application (API Specification x.Y+1.z)  (Yes) service (API Specification x.Y+1.z) 4. Application (API Specification x.Y+1.z)  (No) service (API Specification x.Y.z) But, we can handle that by building the routing rules with information from both API Registry and API Service Discovery ;-) Routing 217
  153. Routing 221 swagger: '2.0' info: title: Account Information API version:

    1.0.3 host: api.ing.com basePath: / schemes: - https paths: /accounts: get: parameters: - ... { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } v1.0.3
  154. Routing 222 API Registry swagger: '2.0' info: title: Account Information

    API version: 1.0.3 host: api.ing.com basePath: / schemes: - https paths: /accounts: get: parameters: - ... { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } v1.0.3
  155. Routing 223 API Registry API Developer Portal swagger: '2.0' info:

    title: Account Information API version: 1.0.3 host: api.ing.com basePath: / schemes: - https paths: /accounts: get: parameters: - ... { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts" } v1.0.3
  156. Routing 224 API Registry API Developer Portal v1.0.3 swagger: '2.0'

    info: title: Account Information API version: 1.0.3 host: api.ing.com basePath: / schemes: - https paths: /accounts: get: parameters: - ...
  157. Routing 225 API Registry API Developer Portal Service~1 v1.0.3 swagger:

    '2.0' info: title: Account Information API version: 1.0.3 host: api.ing.com basePath: / schemes: - https paths: /accounts: get: parameters: - ...
  158. Routing 226 v1.0.3 API Registry API Developer Portal Service~1 Manifest

    { "serviceName": "Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } swagger: '2.0' info: title: Account Information API version: 1.0.3 host: api.ing.com basePath: / schemes: - https paths: /accounts: get: parameters: - ...
  159. Routing 227 v1.0.3 API Registry API Developer Portal Service~1 Manifest

    { "serviceName": "Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] }
  160. Routing 228 v1.0.3 API Registry API Developer Portal Service~1 Manifest

    { "serviceName": "Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] }
  161. Routing 229 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest 10.0.0.1:9001 { "serviceName": “Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] }
  162. Routing 230 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest 10.0.0.1:9001 { "serviceName": “Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] }
  163. Routing 231 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest { "serviceName": “Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } 10.0.0.1:9001 API Service Discovery
  164. Routing 232 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest { "serviceName": “Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } 10.0.0.1:9001 API Service Discovery { "ip": "10.0.0.1:9001", "port": "9001" }
  165. Routing 233 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest { "serviceName": “Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } 10.0.0.1:9001 API Service Discovery { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } }
  166. Routing 234 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } }
  167. { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints":

    [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 235 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery
  168. { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints":

    [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 236 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery
  169. { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints":

    [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 237 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Application~1
  170. { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints":

    [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 238 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Application~1 (when v1.0.3) Subscription
  171. { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints":

    [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 239 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] }
  172. { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1", "endpoints":

    [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 240 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] }
  173. Router { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1",

    "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 241 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK
  174. Router { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1",

    "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 242 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token
  175. Router { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1",

    "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 243 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token
  176. Router { "ip": "10.0.0.1:9001", "port": "9001", "manifest": { "serviceName": "Service~1",

    "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } } Routing 244 v1.0.3 API Registry API Developer Portal Instance of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ]
  177. Router Routing 245 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ]
  178. Router Routing 246 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ]
  179. Router Routing 247 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ] v1.1.0
  180. Router Routing 248 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ] v1.1.0 Service~1 v1.1.2 10.0.0.2:9001
  181. Router Routing 249 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ] v1.1.0 Service~1 v1.1.2 10.0.0.2:9001 Manifest
  182. Router Routing 250 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ] v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest
  183. Router Routing 251 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" } ] v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest
  184. Router Routing 252 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" }, { "ip": "10.0.0.2", "port": "9001", "apiSpecificationVersion": "1.1.0" }, ] v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest
  185. Router Routing 253 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery Instance of Application~1 (when v1.0.3) Subscription { “applicationName": "Application~1", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.0.3" } ] } API SDK Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" }, { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.1.0" }, ] v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest
  186. Routing 254 v1.0.3 API Registry API Developer Portal Instance of

    Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest
  187. Router Routing 255 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Application~2
  188. Router Routing 256 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Application~2 (when v1.1.0) Subscription
  189. Router Routing 257 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Application~2 (when v1.1.0) Subscription { “applicationName": "Application~2", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.1.0" } ] }
  190. Router Routing 258 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Instance of Application~2 (when v1.1.0) Subscription { “applicationName": "Application~2", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.1.0" } ] }
  191. Router Routing 259 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Instance of Application~2 (when v1.1.0) Subscription { “applicationName": "Application~2", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.1.0" } ] } Peer-Token
  192. Router Routing 260 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Instance of Application~2 (when v1.1.0) Subscription { “applicationName": "Application~2", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.1.0" } ] } Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" }, { "ip": "10.0.0.2", "port": "9001", "apiSpecificationVersion": "1.1.0" }, ]
  193. Router Routing 261 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Instance of Application~2 (when v1.1.0) Subscription { “applicationName": "Application~2", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.1.0" } ] } Peer-Token [ { "ip": "10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" }, { "ip": "10.0.0.2", "port": “9001", "apiSpecificationVersion": "1.1.0" }, ]
  194. Router Routing 262 v1.0.3 API Registry API Developer Portal Instance

    of Service~1 v1.0.5 Manifest 10.0.0.1:9001 API Service Discovery API SDK v1.1.0 Instance of Service~1 v1.1.2 10.0.0.2:9001 Manifest Instance of Application~2 (when v1.1.0) Subscription { “applicationName": "Application~2", "endpoints": [ { "method": "get", "host": "api.ing.com", "urlPathTemplate": "/accounts", "apiSpecificationVersion": "1.1.0" } ] } Peer-Token [ { "ip": “10.0.0.1", "port": "9001", "apiSpecificationVersion": "1.0.3" }, { "ip": “10.0.0.2", "port": “9001", "apiSpecificationVersion": "1.1.0" }, ]
  195. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services Summary 266
  196. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services • Make an explicit link between service and API endpoints within a manifest* Summary 267
  197. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services • Make an explicit link between service and API endpoints within a manifest* • Register instances at run-time to API Service Discovery • Get the physical address of instances at run-time via API Service Discovery Summary 268
  198. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services • Make an explicit link between service and API endpoints within a manifest* • Register instances at run-time to API Service Discovery • Get the physical address of instances at run-time via API Service Discovery • Request explicit subscriptions to API endpoints at design-time, and store them in API Registry • Make subscriptions available at run-time with peer-tokens* Summary 269
  199. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services • Make an explicit link between service and API endpoints within a manifest* • Register instances at run-time to API Service Discovery • Get the physical address of instances at run-time via API Service Discovery • Request explicit subscriptions to API endpoints at design-time, and store them in API Registry • Make subscriptions available at run-time with peer-tokens* • Let the (client-side) router make a wise decision about which instance to call by combining information coming from API Registry and API Service Discovery * The structure of a manifest and a peer-token is the same – I like symmetry ;-) – and, for both, the trick is to remember/store the version of API specification ;-) Summary 270
  200. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services • Make an explicit link between service and API endpoints within a manifest* • Register instances at run-time to API Service Discovery • Get the physical address of instances at run-time via API Service Discovery • Request explicit subscriptions to API endpoints at design-time, and store them in API Registry • Make subscriptions available at run-time with peer-tokens* • Let the (client-side) router make a wise decision about which instance to call by combining information coming from API Registry and API Service Discovery * The structure of a manifest and a peer-token is the same – I like symmetry ;-) – and, for both, the trick is to remember/store the version of API specification ;-) Summary 271
  201. • Make an explicit distinction between API (endpoints) and services

    • Use semantic versioning for both API specifications (OpenAPI/Swagger) and services • Make an explicit link between service and API endpoints within a manifest* • Register instances at run-time to API Service Discovery • Get the physical address of instances at run-time via API Service Discovery • Request explicit subscriptions to API endpoints at design-time, and store them in API Registry • Make subscriptions available at run-time with peer-tokens* • Let the (client-side) router make a wise decision about which instance to call by combining information coming from API Registry and API Service Discovery * The structure of a manifest and a peer-token is the same – I like symmetry ;-) – and, for both, the trick is to remember/store the version of API specification ;-) • Extend this technique to other strategies for Canary Release, Confidence Check, A/B testing, … it’s a unified way to handle any special routing mechanisms you want to implement ;-) Summary 272
  202. • Make an explicit distinction between API (endpoints) and services

    • Make an explicit distinction between the interface and the code Summary 273 Click to edit Master title style
  203. • Make an explicit distinction between API (endpoints) and services

    • Make an explicit distinction between the interface and the code Summary 274 Click to edit Master title style
  204. API Versioning, DON’T bother your consumers with it ;-) Thank

    You! Patrice Krakow, Lead Architect, APIs, ING https://www.linkedin.com/in/patricekrakow/ @patricekrakow
  205. API Versioning, DON’T bother your consumers with it ;-) Thank

    You! Patrice Krakow, Lead Architect, APIs, ING https://www.linkedin.com/in/patricekrakow/ @patricekrakow
  206. API Versioning, DON’T bother your consumers with it ;-) Thank

    You! Patrice Krakow, Lead Architect, APIs, ING https://www.linkedin.com/in/patricekrakow/ @patricekrakow