Vijay Narayanan - Enterprise API Management
Vijay Narayanan - Enterprise API Management
4 May 2018
Vijay Narayanan
1
Agenda
API Contracts
API Catalog
API Gateway
Design Patterns
Conclusion
2
Application Programming Interfaces (APIs)
Introduction
Body Heading
Wikipedia definition:
“An application programming interface (API) is a set of subroutine definitions, protocols,
and tools for building application software. In general terms, it is a set of clearly defined
methods of communication between various software components. A good API makes it
easier to develop a computer program by providing all the building blocks, which are then
put together by the programmer.”
APIs provide a set of programmatic primitives that can be used in countless new ways to
explore opportunities, solve problems
For the purpose of this session – APIs are REST based & accessed over HTTP / HTTPS
3
Enterprise Concerns & Challenges
What are some common API Management pain points?
Internal & External facing APIs developed & managed in fundamentally different ways…
APIs created & managed via multiple technology stacks (Node JS, Spring Boot, )
APIs have differences in authentication, authorization, telemetry capture, versioning, scalability levers,…
API Integrations are point-to-point that force O(n) solutions and increase cost of ownership
Inconsistent controls (e.g. on API contract, security, etc.) that result in high cost
Inadequate hooks to measure/improve latency, availability, operability, & scalability
Service Level Objectives (SLOs) – e.g. latency, availability, etc. – not always machine readable
Unspecified SLOs result in tribal knowledge & high operational risk
Lack of SLOs hurt data driven API evolution – how do you know if less latency is what clients care about?
4
API Platform – Key Elements
Accounting for enterprise, provider, & consumer needs
API Contracts
Model & Provision APIs as
infrastructure-as-code
6 2
API Management
Elements
5 3
API Gateway
Mediate, Scale, & Secure
APIs at runtime
5
API Management Core Tenets
Technical Principles to guide decision making
6
API Contracts
API Contracts authored or generated from IDE and checked into source control
Post-provisioning lifecycle events published for custom event handling (analytics, risk
assessment, controls, legacy integrations)
7
Sample Open API Contract
Describing APIs
openapi: "3.0.0"
responses:
info: '200':
description: An paged array of pets
version: 1.0.0 headers:
x-next:
title: Swagger Petstore description: A link to the next page of
responses
license: schema:
type: string
name: MIT
content:
application/json:
servers:
schema:
$ref: "#/components/schemas/Pets“
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
operationId: listPets
parameters:
- name: limit
in: query
required: false
schema:
type: integer
format: int32
…Complete examples at: https://github.com/OAI/OpenAPI-Specification/tree/master/examples/v3.0
8
API Catalog
Be an authoritative store for API contracts that conform to an open specification
Be full-text searchable across both contract definitions and associated metadata
Support API definition and real-time invocations (for demos / proof of concepts)
Support Account Management – i.e. link consumer subscriptions & usage across APIs
9
API Gateway
Reverse Proxy between API Consumer & Provider
Services
Consumer
G
AuthN AuthZ Rate Limit Validate Custom …
A
Consumer T Legacy
E Endpoints
W Custom Zip Render Limit Verify …
Consumer A
Y Function-
as-a-
Service
Functionality: Technology:
• Searchable API Catalog for both API publishers & consumers • Platform, language, & stack agnostic
• Multi-tenant and support custom request and response filters • Leverage open-source API Management solutions
• Infra-as-Code semantics to define, integrate, & test API contracts • Non-blocking and optimized for minimal latency overhead at runtime
• Self-Service tooling for API Publishers, Consumers, & Admins • Will be integrated with firm-specific platform technologies
• First-class support for API lifecycle & versioning • Type-safe & IDE friendly abstractions
10
Traffic Capture & Replay for Safer Upgrades
Using the gateway for graceful versioning
11
Distributing Traffic Across Versions
Using the gateway for graceful versioning
12
Segregate Prod & Non-Prod Traffic
Dealing with realities of multi-tenancy
Consumers can either due to defects or manual errors trigger high volume of requests
during their development / SDLC
Non-prod traffic is second priority – segregated resources thus can be reassigned to
deal with spikes in production traffic
Independent instances will reduce blast radius, rogue client behavior, etc
13
Disclaimer:
Views and opinions expressed are for informational purposes
only. They do not constitute a recommendation by Goldman
Sachs to buy, sell or hold any security. No part of this material
may, without Goldman Sachs’s prior written consent, be (i)
copied, photocopied or duplicated in any form, by any means,
or (ii) distributed to any person that is an employee, officer,
director, or authorized agent of the recipient