Subscribe to the feed

Introduction

In today's fast-paced business environment, efficient and agile application development is critical for success. One tool that can help achieve this is OpenShift Serverless. In this post, we will explore what OpenShift Serverless is and how it can simplify application development for microservices and functions. Additionally, we will discuss the latest advancements in OpenShift Serverless that can further enhance the development process.

What is OpenShift Serverless?

OpenShift Serverless is an add-on to the OpenShift platform that takes your development efficiency to the next level by providing a streamlined experience for creating, deploying, and scaling microservices, functions, and event-driven applications. OpenShift Serverless allows developers to build, deploy, and scale applications without having to worry about the management or provisioning of the underlying network and infrastructure.

OpenShift Serverless is an abstraction layer on OpenShift and by being part of the broader OpenShift application platform. Developers using OpenShift Serverless have access to a complete toolbox for building and running containerized applications. In other words, OpenShift Serverless comes pre-assembled — with ready to use ‘out-of-the-box’ defaults — and offers a simplified workflow for developers than found with standard Kubernetes.

OpenShift Serverless consists of independent components that work well together

OpenShift Serverless is based on the upstream Knative project that provides primitives to create, build, and deploy your microservices and functions.

Functions: Serverless functions empowers developers to create serverless functions that can run in response to events or HTTP requests. Similar to AWS Lambda, Azure Functions, and Google Cloud Functions.

Serving: Knative Serving simplifies deploying and scaling containerized applications on Kubernetes. It automates tasks such as scaling based on requests in flight, rolling out new versions by traffic percentage, and providing automatic health checks, TLS provisioning, and HTTP(S) URL provisioning.

Eventing: Knative Eventing  component provides the infrastructure for building and deploying event-driven applications. It enables developers to define event sources and sinks and provides a mechanism for routing events to functions and applications or other event sinks.

Logic: Based on CNCF ServerlessWorkfow specification, Serverless logic is a tool to build cloud-native workflow applications. Serverless logic provides services and events orchestration and choreography with a no-code/low-code approach. With logic, you can integrate with services and events in your architecture using CloudEvents, synchronous and asynchronous REST invocations, and many other industry-standard components.

What is in OpenShift Serverless

Let’s unwrap OpenShift Serverless to see how it simplifies OpenShift and lowers the entry bar to Kubernetes.

Serverless function

Serverless function is a programming model designed to help developers focus on their code for faster iterations. With a strong emphasis on developer productivity, serverless functions offer a range of features such as local development, multiple build strategies, and IDE support. Developers can create and deploy functions in just two steps by leveraging project scaffolding for the pre-selected runtime, such as Node.js, TypeScript and Quarkus. Additionally, function developers can easily enable Volumes and Secrets, add labels and annotations, and set environment variables with a simple configuration command. By doing so, developers can spend more time creating value instead of building containers or managing underlying networking and infrastructure concerns.

Built on an event-driven architecture, serverless functions can react to events and execute code in response. These events can originate from a variety of sources, including plain HTTP requests, messages sent to a queue, or file uploads. Serverless functions use CloudEvents for portable, consistent, and accessible events, making integration with other cloud services a breeze. Functions also take advantage of OpenShift Pipelines for in-cluster builds, allowing developers to quickly build and deploy functions from their development environment or GitHub repository to the cluster enabling continuous integration and delivery (CI/CD) systems.

Functions offer a serverless computing experience, meaning they can automatically scale up and down based on demand without the need to manage servers. Functions are deployed as Knative Service and can handle multiple concurrent requests per function, making them ideal for handling a variety of workloads.

Serverless functions are Generally Available with Quarkus, Node.js and TypeScript runtimes and provide Developer Experience through CLI and OpenShift Developer Console.

Serving

OpenShift Serverless is a natural add-on to any Kubernetes cluster serving HTTP traffic. You can run your Microservice or any stateless workload on OpenShift Serverless. OpenShift Serverless provides reproducible deployments through revisions which enables traffic-splitting abilities, rollbacks, out-of-the-box telemetry, and scale-to-zero. You can also mix and match Knative with standard Kubernetes constructs. In short, OpenShift Serverless’ seamless integration with OpenShift enables DevOps adoption by reducing the need for developers to explicitly describe the infrastructure and networking construct.

As seen from the picture above for an OpenShift/Kubernetes, the user has to create resources,such as,  Deployment, Service, HPA, Ingress, Route manually. However,Knative introduces higher-level primitives with Knative "Service" and automatically  creates OpenShift/Kuberenetes resources hence reducing the cognitive overload for developers.

Serving is Generally Available, please check our release notes for all available features.

Eventing

Serverless applications are inherently event-driven and OpenShift Serverless offers Event Mesh, an eventing infrastructure that simplifies distributing events from senders to recipients. Event Mesh uses standard HTTP POST requests to send and receive events between event producers and event consumers. These events conform to the CloudEvents specifications, which enable creating, parsing, sending, and receiving events in any programming language. EventMesh provides asynchronous (store-and-forward) delivery of messages and simplifies the routing concerns of senders and recipients by decoupling them from the underlying event transport infrastructure. The mesh transports events from producers to consumers via a network of interconnected event brokers across any environment, and even between clouds in a seamless and loosely coupled way.

Eventing is generally available and offers Event sources for Kafka alongside other built-in Event Sources, such as an adapter to Kubernetes API events, a source that emits CloudEvents periodically and a source that can use an arbitrary container image as producer of Cloud Events.  In addition, several event sources, such as AWS S3, AWS Kinesis, AWS SQS, AWS SNS, Elasticsearch, Salesforce, MongoDB, and other Databases (PostgreSQL, MySQL, SQL Server) to name a few.

Serverless logic: OpenShift Serverless logic enables developers to easily orchestrate services and functions and define workflows that coordinate the execution of different functions and services based on a wide range of criteria. Serverless logic implements the CNCF Serverless Workflow specification, allowing developers and architects to define logical steps of execution declaratively (no code) for cloud-native services. The platform includes built-in error handling and fault tolerance, making it easier to handle errors and exceptions that occur during the execution of a workflow. Additionally, OpenShift Serverless logic lets you visualize the execution of workflows, making it easier to debug and optimize workflows

Serverless logic is currently in Developer Preview and you can find our documentation here

How to get started

OpenShift Serverless is Generally available on all supported OpenShift. Please check our documentation for release notes and all available features. You can read our blogs on the Red Hat Developers site and download our Knative Cookbook and don’t forget to try OpenShift Serverless yourself free of charge for 30 days through Red Hat Developers Sandbox.  


About the author

Naina Singh joined Red Hat in 2018 and is currently the Principal Product Manager for Red Hat OpenShift Serverless.

Read full bio
UI_Icon-Red_Hat-Close-A-Black-RGB

Browse by channel

automation icon

Automation

The latest on IT automation for tech, teams, and environments

AI icon

Artificial intelligence

Updates on the platforms that free customers to run AI workloads anywhere

open hybrid cloud icon

Open hybrid cloud

Explore how we build a more flexible future with hybrid cloud

security icon

Security

The latest on how we reduce risks across environments and technologies

edge icon

Edge computing

Updates on the platforms that simplify operations at the edge

Infrastructure icon

Infrastructure

The latest on the world’s leading enterprise Linux platform

application development icon

Applications

Inside our solutions to the toughest application challenges

Original series icon

Original shows

Entertaining stories from the makers and leaders in enterprise tech