Serverless Micronaut on Google Cloud Platform

Serverless Micronaut on Google Cloud Platform

Thanks to its performance, low memory consumption, and lightning-fast startup time, Micronaut is particularly well-suited for services that run on serverless solutions.

"But it takes so much time to build infrastructure," you might be thinking.

We get it. You don't want to let infrastructure slow down your progress.

But ... serverless, though.

So let's explore how to take advantage of readily available serverless solutions!

If you're ready to discover how you can relax, focus on your Micronaut code, and rapidly deploy it as a function, as an application, or within a container on Google Cloud Platform, join Google Developer Advocate, Guillaume Laforge, to get insider tips for using Cloud Functions, App Engine, and Cloud Run.

In this complimentary, 60-minute webinar, Guillaume demonstrates the options you have to deploy your Micronaut applications and services on Google Cloud without spending all your time on infrastructure. He covers an easy way to get started by using a Micronaut Launch template project and explains how, with just a few tweaks, you can push your code to production.

137d3908243acfc30e126615d59d4e6d?s=128

Guillaume Laforge

July 31, 2020
Tweet

Transcript

  1. Serverless Micronaut on Google Cloud Platform Developer Advocate Google

  2. Guillaume Laforge Image safe area @glaforge

  3. @glaforge Google Cloud Platform

  4. @glaforge https://cloud.google.com/about/locations/ A Big Global Network of Data Centers

  5. Panorama Machine Learning Cloud ML Platform Vision API Video Intelligence

    API Speech API Translate API NLP API ... Compute Compute Engine App Engine Kubernetes Engine Container Registry Cloud Run Cloud Functions ... Networking Cloud Virtual Network Cloud Load Balancing Cloud CDN Cloud Interconnect Cloud DNS ... Storage & Databases Cloud Storage Cloud Bigtable Cloud Firestore Cloud SQL Cloud Spanner ... Big Data BigQuery Cloud Dataflow Cloud Dataproc Cloud Dataprep Cloud Datalab Cloud Pub/Sub Genomics ... Management Monitoring Logging Error Reporting Debugger Deployment Manager ... Developer Cloud SDK Cloud Source Repositories Cloud Endpoints IDE plugins Cloud Test Lab Cloud Build Cloud Build Artifacts ... Identity & Security Cloud IAM Cloud IAP Cloud KMS Cloud Secret Manager Cloud Resource Manager Cloud Security Scanner Cloud Platform Security ...
  6. Virtual Machine OS Application Runtime Application Virtual Hardware Dedicated Server

    OS Application Runtime Application Virtual Hardware Containers OS Application Runtime Application Virtual Hardware Functions Functions Functions Application Platform OS Application Runtime Application Virtual Hardware Functions Serverless OS Application Runtime Application Virtual Hardware Functions Infrastructure Container Platform Function Compute Engine Kubernetes Engine App Engine Cloud Functions On-Premises Serverless Zone Physical Hardware Cloud Run
  7. Operational Model Programming Model No Infra Management Managed Security Pay

    only for usage Service-based Event-driven Open Operational & Programming Models
  8. Serverless HTTP applications Sourced-based web apps App Engine Serverless functions

    and events Source-based event driven functions Cloud Functions Serverless HTTP containers Fully managed HTTP req/res containers HTTP req/res containers on GKE Cloud Run Google Cloud Compute Serverless Options
  9. Cloud Functions

  10. Cloud Functions as a cloud glue Access 20+ Google services

    from GCF Cloud Storage Cloud Pub/Sub HTTPS Firebase Cloud Scheduler Cloud Tasks
  11. Cloud Functions runtimes NEW!

  12. HTTP functions Cloud Functions provides a URL for your function

    Invoked by an HTTP call GET, POST, PUT, DELETE, OPTIONS Function replies with HTTP response Header, body, status code, etc. Background functions React to events in your cloud infrastructure Pub/Sub message on a topic New file on Cloud Storage Change in Cloud Firestore docs Audit log event Two Types of Functions
  13. DEMO Micronaut HTTP & Background Functions

  14. App Engine

  15. Serverless, but for your whole web app and not just

    single functions Goal: let developers focus on code, GCP handle the rest Open-source, idiomatic experience Use any library, extension, binary, or framework Java, Python, Node.js, PHP, Ruby, Go What’s App Engine?
  16. Scale up / down quickly One vs. multiple concurrent requests

    Traffic splitting across versions (A/B testing, Canary or Blue/Green depl.) CDN static asset serving Concurrency & Scaling Traffic Traffic
  17. DEMO Micronaut Application on Google App Engine

  18. Cloud Run

  19. Any language Any library Any binary Ecosystem of base images

    Cloud Run .js .rb .go .py .java … 0 1 0 1 0 0 1 1 1
  20. Cloud Run Cloud Run Fully managed, deploy your workloads and

    don’t see the cluster. Cloud Run on Anthos Deploy into Anthos, run serverless side-by-side with your existing workloads. Knative Everywhere Use the same APIs and tooling anywhere you run Kubernetes with Knative.
  21. Listen on 0.0.0.0 on port $PORT (default 8080) HTTP server

    must start < 4 min (timeout → 504) Request time < 15 min (default → 5 min) Stateless (in-memory file system, doesn’t persist) Computation only within request (no background activity) Container Contract
  22. Pay Per Use CPU / Memory / Requests 100ms

  23. Billable Time Instance Billable Time Request 1 Start Request 1

    End Request 2 Start Request 2 End Instance Time Billable Non-billable
  24. DEMO Building a Micronaut container image with Jib and deploy

    on Cloud Run
  25. Summary

  26. Google Cloud allows you to run your Micronaut functions, apps,

    and containers on: • App Engine • Cloud Functions • Cloud Run Take advantage of the various data storage, communication channels, machine learning options… Why Micronaut? Because it starts fast and consumes less memory than the competition! Run Micronaut Serverlessly!
  27. Proprietary + Confidential Thank you Questions & Answers Guillaume Laforge

    — @glaforge