making your api behave like a big boy

33
API Management Making your API behave like a big boy Andrew Siemer | Clear Measure [email protected] @asiemer

Upload: andrew-siemer

Post on 17-Jul-2015

6.181 views

Category:

Software


1 download

TRANSCRIPT

API Management

Making your API behave

like a big boy

Andrew Siemer | Clear Measure

[email protected]

@asiemer

Welcome to Azure Austin

All things related to the Microsoft Cloud!

meetup.com/AzureAustin

Clear Measure Workshops

Day long, Clear Measure led, fingers on keyboards, learn by doing

CQRS, DDD, Event Sourcing, Distributed Systems, Micro Services

meetup.com/clear-measure-workshop

Andrew Siemerhttp://about.me/andrewsiemer

ASP InsiderMS v-TSP (Azure)

Azure Advisor ProgramFather of 6. Jack of all trades, master of some.

• Stories from the programming trenches

• How to grow your programming career

• http://www.developerspringboard.com

• @devspringboard

We are hiring!!!

Introduction

What is an API management tool and why do I need it?

More details here!

• Andrew Siemer on LosTechies

• “making your api behave like the big boys”

• http://goo.gl/DTQIGu

Topics to cover

• Downside of directly exposing your API

• Introducing Proxy’s & Gateways

• Features you need to know about

• Available tools

• Azure API Management

Downside of direct access

• Flexibility in deployment story

• Versioning is harder, and in code

• Security, Authentication, Authorization in code

• Cohesive API forces single solution (mega code base)• Not micro-service friendly

• Basically, you need it? You write it!

Proxy’s and Gateways

• Proxy• Thin pass through

• Expects something on the other end to respond

• Gateway• Thick pass through

• Exposes mega feature list

Features available in managed API

• Acceleration

• Routing

• URL Rewriting

• Versioning

• Cohesion

• Rate Limiting & Throttling

• Security

• Server Affinity

• Monitoring

• A/B Testing

• Blue/Green Deployments

Tools – Proxy’s

• Nginx

• HAProxy

• httpd

Tools – Proxy’s – Which one?

Tools – Proxy’s – Which one?

• nginx

Tools – Proxy’s – Which one?

• haproxy

Tools – Proxy’s – Which one?

• httpd

Tools – Proxy’s – Which one?

• Pick by features

• All are mature and well supported

• Nginx is clear popularity winner

Living in a Microsoft world?

• Application Request Routing (ARR)

• Snaps in to IIS

• Familiar UI• UI!!! Not command line!

• Configuration documents• XML

ARR

ARR

Azure API Management

Demo API – MS CalcAPI

• Great Azure Friday videos on API Management• http://channel9.msdn.com/Shows/Azure-Friday/

• Using Postman or similar you can tinker• http://calcapi.cloudapp.net/calcapi.json

• http://calcapi.cloudapp.net/api/add?a=2&b=3

• http://calcapi.cloudapp.net/api/sub?a=2&b=1

Plug the API into the manager

Take advantage of the magic: operations

• Adding operations enables built in tools

“Products”

• You have to add your API to your products

Now subscribe to the Product

• Users have to subscribe to products, to get access to API’s• Administrators are auto subscribed

Developer Portal

• We can test our api from the developer portal

• Upper right of admin panel

Developer Portal

Code Generation

Console for testing

Questions?

Andrew Siemer - Clear Measure

[email protected]

(512) 387-1976

@asiemer