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

Functionia: An event-driven adventure in the serverless metaverse with OpenShift Serverless

Functionia: An event-driven adventure in the serverless metaverse with OpenShift Serverless

Aykut Bulgu

April 14, 2022
Tweet

More Decks by Aykut Bulgu

Other Decks in Technology

Transcript

  1. CONFIDENTIAL designator V0000000 An event-driven adventure in the serverless metaverse

    with OpenShift Serverless Functionia Aykut Bulgu Senior Content Architect 1
  2. CONFIDENTIAL designator V0000000 Me as Code 2 #oc apply -f

    aykutbulgu.yaml apiVersion: redhat/v3.8 kind: Senior Content Architect metadata: name: Aykut Bulgu namespace: Red Hat Global Learning Services annotations: twitter: @systemcraftsman email: - [email protected] - [email protected] organizer: Software Craftsmanship Turkey founder: System Craftsman labels: married: yes children: 1 interests: - tech (mostly kafka) - aikido - gamification - stoicism spec: replicas: 1 containers: - image: aykut:latest
  3. CONFIDENTIAL designator V0000000 What do we have in the webinar?

    3 ➔ Traditional long-running application architecture and its drawbacks. ➔ OpenShift Serverless Serving and creating functions. ➔ OpenShift Serverless Eventing and how it solves problems by: ◆ Reducing the coupling between services. ◆ Providing autoscale and scale-to-zero capabilities to the applications. ➔ Building blocks for eventing like source, channel, subscription, sink, and more. ➔ CloudEvents usage in an OpenShift Serverless Eventing architecture.
  4. CONFIDENTIAL designator V0000000 Meet OSVR-4 6 Hello. I am OSVR-4.

    I will help you through your journey in Functionia.
  5. CONFIDENTIAL designator V0000000 Functionia: The serverless metaverse 8 ➔ Miner

    clans do bitmining in a daily basis. ➔ Sometimes no bitmining is done. ◆ No economical bitmining architecture ◆ Resources are used for nothing ➔ Code bases of miner apps are too complex. ◆ There are more than one technology as there are more than one clan. ◆ Harder development life-cycle. ➔ In case of failures in the miner clans, there is no retry mechanism. All processes are synchronous. ➔ Quakers miner clan face a lot of issues like these recently.
  6. CONFIDENTIAL designator V0000000 OpenShift Serverless 11 OpenShift Serverless ➔ Deploy

    and run serverless containers ➔ Use any programming language or runtime ➔ Modernize existing applications to run serverless ➔ Powered by a rich ecosystem of event sources ➔ Manage serverless apps natively in Kubernetes ➔ Based on open source project Knative ➔ Run anywhere OpenShift runs OPENSHIFT OpenShift Serverless SERVING EVENTING Red Hat Enterprise Linux CoreOS Physical Virtual Private cloud Public cloud Applications Events F
  7. CONFIDENTIAL designator V0000000 OpenShift Serverless 12 Immutable revisions Deploy new

    features performing canary, A/B or blue-green testing with gradual traffic rollout with no sweat and following best practices. Any programming language Use any programming language or runtime of choice. From Java, Python, Go and JavaScript to Quarkus, SpringBoot or Node.js. No need to configure number of replicas, or idling. Scale to zero when not in use, auto scale to thousands during peak, with built-in reliability and fault-tolerance. Automatic scaling Use a simplified developer experience to deploy and run serverless containers abstracting infrastructure & focusing what matters. Containers made easy prem aws Ready for the Hybrid Cloud True portable serverless running anywhere OpenShift runs, that is on premise or on any cloud. Leverage data locality and SaaS when needed. azure Event Driven Architecture Build loosely coupled & distributed apps connecting with a variety of built-in or third-party event sources connectors powered by Operators.
  8. CONFIDENTIAL designator V0000000 OpenShift Serverless 15 SERVING An event-driven model

    that serves the container with your application and can "scale to zero". Common infrastructure for consuming and producing events that will stimulate applications. EVENTING ➔ Autoscaling with scale-to-zero ➔ Advanced networking ➔ Immutable revisions ➔ Traffic splitting ➔ Knative Service ➔ Functions ➔ Serverless workloads with event-driven architecture ➔ Source ◆ Kafka Source ➔ Channel ◆ Kafka Channel ➔ Subscription ➔ Broker ➔ Trigger
  9. CONFIDENTIAL designator V0000000 OpenShift Serverless 16 apiVersion: apps/v1 kind: Deployment

    metadata: name: frontend labels: app: guestbook spec: selector: matchLabels: app: guestbook tier: frontend replicas: 1 template: metadata: labels: app: guestbook tier: frontend spec: containers: - image: markusthoemmes/guestbook name: guestbook resources: requests: cpu: 100m memory: 100Mi env: - name: GET_HOSTS_FROM value: dns ports: - containerPort: 80 apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: frontend spec: template: metadata: labels: app: guestbook tier: frontend spec: containers: - image: markusthoemmes/guestbook resources: requests: cpu: 100m memory: 100Mi env: - name: GET_HOSTS_FROM value: dns ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: frontend-service labels: app: guestbook tier: frontend spec: ports: - port: 80 selector: app: guestbook tier: frontend --- apiVersion: route.openshift.io/v1 kind: Route metadata: name: frontend-route spec: to: kind: Service name: frontend-service OpenShift OpenShift Serverless apiVersion: extensions/v1beta1 kind: HorizontalPodAutoscaler metadata: name: guestbook namespace: default spec: scaleRef: kind: ReplicationController name: guestbook namespace: default subresource: scale minReplicas: 1 maxReplicas: 10 cpuUtilization: targetPercentage: 50 22 lines ~70 lines
  10. CONFIDENTIAL designator V0000000 OpenShift Serverless 17 Service Microservice Function >

    Single Purpose > Stateless > Independently Scalable > Automated > Single Action > Ephemeral > Autonomous > Loosely-coupled f( )
  11. CONFIDENTIAL designator V0000000 Channel and Subscriptions 27 Well, I can

    help. We’ll use a Broker and Triggers. But we have wrong tags.
  12. CONFIDENTIAL designator V0000000 Traffic Distribution 31 Noders keep Noders clan

    should keep 80% of Vibranium. To Wakanda 20% of the Vibranium should be sent to Wakanda. 80% 20%
  13. CONFIDENTIAL designator V0000000 linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat 36 Red Hat

    is the world’s leading provider of enterprise open source software solutions. Award-winning support, training, and consulting services make Red Hat a trusted adviser to the Fortune 500. Thank you