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

017286889e25c87cb44b20ceca2d1d79?s=128

Daron Yondem

October 03, 2019
Tweet

Transcript

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

  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
  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.
  4. Azure Functions on Kubernetes with KEDA • https://drn.fyi/2ppbVxN Create a

    function on Linux using a custom image • https://drn.fyi/2nQwd2E
  5. • API Routing, Versioning, Caching, Throttling • Managing state across

    multiple functions. • Eventing • Function Orchestration for you and for dummies!
  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 .
  7. Using function proxies to hijack 3rd party APIs. Don’t try

    this at home!
  8. None
  9. None
  10. None
  11. None
  12. {request.method} {request.headers.<HeaderName>} {request.querystring.<ParameterName>}

  13. {backend.response.statusCode} {backend.response.statusReason} {backend.response.headers.<HeaderName>}

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

  15. • Rate limiting • Access Policies • Caching • Subscriptions

    • Licensing • Analytics • Developer Portal • and so on…
  16. Throttling!

  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. Azure Proxies Official Documentation • https://aka.ms/ProxiesDocs OpenAPI (Swagger) export from

    Azure Functions • https://goo.gl/LWbFmH
  24. • Stateful functions • Managed state, checkpoints, and restarts when

    needed. • Define stateful workflows in orchestrator functions. • Actor like Durable Entities in Durable 2.0 .
  25. • No visualization to show relationship between functions and queues.

    • Middle queues are an implementation detail – conceptual overhead. • Error handling adds a lot more complexity.
  26. • 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
  27. • Long running processes • Built-in state management • orchestrationClient

    or built-in webhooks can be used.
  28. • Actor like scenarios. • Long-running (possibly endless), stateful, reliable,

    single- threaded, location-transparent, and globally addressable.
  29. Consuming 3rd party throttled APIs with ease.

  30. • 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
  31. None
  32. • 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
  33. 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
  34. None
  35. None
  36. None
  37. None
  38. • 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.
  39. None
  40. None
  41. None
  42. None
  43. Event Grid Extension for Azure Functions • https://goo.gl/7z88G3 Choosing the

    right Azure messaging service for your data • https://goo.gl/19YPDZ
  44. • 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
  45. None
  46. None
  47. None
  48. None
  49. None
  50. Sample project used during presentation • https://drn.fyi/2nTbb3y OpenAPI (Swagger) export

    from Azure Functions • https://goo.gl/LWbFmH
  51. http://daron.me | @daronyondem Download slides here; http://decks.daron.me