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

What comes after your first function in Serverless?

What comes after your first function in Serverless?

This is a presentation I delivered for the Serverlessdays Conference in Istanbul. Sample codes used during the presentation are shared on GitHub; https://drn.fyi/2nTbb3y

Daron Yondem

October 03, 2019
Tweet

More Decks by Daron Yondem

Other Decks in Programming

Transcript

  1. Daron Yöndem
    http://daron.me
    @daronyondem

    View full-size slide

  2. • How to create a function in Azure Functions
    • How to create HTTP APIs in Azure Functions
    • How to create timer jobs in Azure Functions
    • How to use Function bindings

    View full-size slide

  3. • The functions runtime on your laptop is the same as the one
    in Azure.
    • You can have your own Azure Functions environment on-
    premise and use it without Public Azure Cloud.
    • Azure Functions runs on Linux as well as Windows.

    View full-size slide

  4. Azure Functions on Kubernetes with KEDA
    • https://drn.fyi/2ppbVxN
    Create a function on Linux using a custom image
    • https://drn.fyi/2nQwd2E

    View full-size slide

  5. • API Routing, Versioning, Caching, Throttling
    • Managing state across multiple functions.
    • Eventing
    • Function Orchestration for you and for dummies!

    View full-size slide

  6. • Have multiple function apps under a single API surface.
    • Mock APIs for developers!
    • Request/Response overrides
    • Routing
    • Can run locally on your machine #justfyi
    .

    View full-size slide

  7. Using function proxies to hijack 3rd party APIs.
    Don’t try this at home!

    View full-size slide

  8. {request.method}
    {request.headers.}
    {request.querystring.}

    View full-size slide

  9. {backend.response.statusCode}
    {backend.response.statusReason}
    {backend.response.headers.}

    View full-size slide

  10. https://%ORDER_PROCESSING_HOST%/api/orders

    View full-size slide

  11. • Rate limiting
    • Access Policies
    • Caching
    • Subscriptions
    • Licensing
    • Analytics
    • Developer Portal
    • and so on…

    View full-size slide

  12. Azure Proxies Official Documentation
    • https://aka.ms/ProxiesDocs
    OpenAPI (Swagger) export from Azure Functions
    • https://goo.gl/LWbFmH

    View full-size slide

  13. • Stateful functions
    • Managed state, checkpoints, and restarts when needed.
    • Define stateful workflows in orchestrator functions.
    • Actor like Durable Entities in Durable 2.0
    .

    View full-size slide

  14. • No visualization to show relationship between functions and queues.
    • Middle queues are an implementation detail – conceptual overhead.
    • Error handling adds a lot more complexity.

    View full-size slide

  15. • Fanning-out is easy, but fanning-in is more complicated.
    • Functions offers no help with this scenario today
    • All the same problems of the previous pattern

    View full-size slide

  16. • Long running processes
    • Built-in state management
    • orchestrationClient or built-in webhooks can be used.

    View full-size slide

  17. • Actor like scenarios.
    • Long-running (possibly endless), stateful, reliable, single-
    threaded, location-transparent, and globally addressable.

    View full-size slide

  18. Consuming 3rd party throttled APIs with ease.

    View full-size slide

  19. • Service Bus: Async Enterprise Messaging
    • Azure Event Hubs: Distributed Data Streaming
    • Relay: Secure two way communication without changes to
    your network
    • Event Grid: Cross cloud reactive eventing

    View full-size slide

  20. • Pay per event.
    • Sub-second end-to-end latency in the 99th percentile
    • 10.000.000 events per second per region
    • 24 hour retry with exponential back off

    View full-size slide

  21. 1. Events: what happened
    2. Event Publishers: where it took place
    3. Topics: where publishers send events
    4. Event Subscriptions: how you receive
    events
    5. Event Handlers: the app or service
    reacting to the event

    View full-size slide

  22. • Event Hub is an “event ingestor” that accepts and stores event
    data, Azure Event Grid is the distribution fabric for discrete
    “business logic activity” events.
    • Fast and highly parallelized processing of the individual
    streams instead of a filtered subscriber model.

    View full-size slide

  23. Event Grid Extension for Azure Functions
    • https://goo.gl/7z88G3
    Choosing the right Azure messaging service for your data
    • https://goo.gl/19YPDZ

    View full-size slide

  24. • Saving time by designing complex processes using easy to
    understand design tools
    • Implementing patterns and workflows seamlessly, that would
    otherwise be difficult to implement in code
    • Rich Managed Connectors

    View full-size slide

  25. Sample project used during presentation
    • https://drn.fyi/2nTbb3y
    OpenAPI (Swagger) export from Azure Functions
    • https://goo.gl/LWbFmH

    View full-size slide

  26. http://daron.me | @daronyondem
    Download slides here;
    http://decks.daron.me

    View full-size slide