Deploying Kubernetes Applications with Helm
Last week, I hosted a Cloud Academy webinar about open-source FaaS and FaaS on Kubernetes. If you missed the live event, you can watch it here.In...Learn More
Last week, I hosted a Cloud Academy webinar about open-source FaaS and FaaS on Kubernetes. If you missed the live event, you can watch it here.
In this post, I’d like to briefly recap some of the main topics covered, including a high-level introduction to FaaS and an overview of the main open-source projects. Also, I will be answering all of the questions that we received during the webinar, including the ones that I didn’t have time to answer during the live event.
My agenda included the following points:
Let me explain why “on-premises” is in quotes here: FaaS was born in the public cloud, and here I wanted to explore alternative ways of building your own FaaS platform, either in your own private cloud or on top of the IaaS layer of a public cloud.
While Kubernetes is not the only container orchestration system available, I decided to focus on a couple of open-source FaaS frameworks for Kubernetes that have been announced recently: Funktion and Fission.
The concept of Function as a Service (FaaS) was born with AWS Lambda, and it kept growing as one of the core components of the serverless movement. I would actually refer to FaaS as the main component. Without the ability to bring your own code and execute it on demand, serverless would just represent brainless outsourcing.
On Wikipedia, FaaS is directly compared with PaaS (Platform as a Service) solutions. This is a crucial point for many skeptics, in my opinion.
In most PaaS systems the system continually runs at least one server process and even with auto scaling a number of longer running processes are simply added or removed meaning that scalability is more visible to the developer as a problem.
They first key point is that, even if the underlying architecture is very similar, PaaS developers have to explicitly take care of scalability concerns since, for the most part, the concept of “server” is still part of their daily workflow. With FaaS, you no longer have to think of servers or containers. Understanding how containers are handled under the hood is always useful, of course.
Quoting Wikipedia again:
In a FaaS system, the functions are expected to start within milliseconds in order to allow handling of individual requests. In a PaaS systems, by contrast, there is typically an application thread which keeps running for a long period of time and handles multiple requests.
This is the second key point, which has a direct effect on the corresponding pricing model. Indeed, FaaS will only charge you for the actual execution time of your function, rather than the whole application container life.
Roughly speaking, I identified the following minimal requirements of FaaS:
So, how do you deal with FaaS, as a developer? These are the most common concepts and tasks that you need to know:
As far as I know, a complete platform does not yet exist, although you can get pretty close by using AWS Lambda and the Serverless Framework. I think all of the other serverless solutions will begin to keep up with the ideal expectations in 2017.
Open-sourcing a project is a great way to let the community improve it and to get feedback as soon as possible (and ideally before the project is obsolete with respect to potential “competitors”).
There are three main open-source projects that allow you to build your own FaaS platform:
I haven’t personally experimented with IronFunctions and Funker, but they both seem very promising. On the other hand, OpenWhisk is much more mature and comes with dev-friendly tools such as the Serverless Framework OpenWhisk Plugin.
A few FaaS solutions for Kubernetes have been announced and shared recently, thanks to several companies and individual contributors active in the Kubernetes community.
I explored three of these solutions during the webinar:
Interestingly, each of these are written in Go and offer a very similar approach from the function development point of view. Funktion and Fission adopted the very same function interface, which is also quite similar to AWS Lambda.
Why would you decide to build your own FaaS platform? I think there are a few reasonable benefits, as well as strong limitations. As usual, it’s a tough trade-off between freedom, features, costs, and complexity. This holds with or without Kubernetes, in my opinion.
Here are the potential benefits of building your own FaaS platform:
In terms of the cons, I see two. First of all, many of the nice-to-have features of FaaS are not currently available out of the public cloud, such as versioning, staging, environment variables, per-function monitoring and logging, advanced permissions and orchestration, and native triggers for databases, streams, object storage, etc. Secondly, the possibility to have more control over the underlying infrastructure may turn out to be a nightmare and not as cost effective as a public cloud solution, given the high operational complexity.
Here is the complete list of questions that we received during the webinar.
Functions don’t necessarily correspond to RESTful APIs. Some of your functions may respond to events in your system such as newly uploaded objects, updated database records, incoming streaming data, etc. In the case of APIs backed by functions, you need publicly facing endpoints that will forward requests to your function and return its results back as HTTP responses. This is exactly what most FaaS frameworks do, as well as PubSub mechanisms that allow you to implement more complex and event-driven logic.
The most well known public FaaS platforms are AWS Lambda, Azure Functions, Google Cloud Functions, IBM Bluemix, OpenWhisk, Webtask.io, Iron.io, weblab.io, stdlib.com, UnitCluster, and many more still in preview or stealth mode.
Although some of them have a corresponding commercial service, they are all open-source projects worth exploring. OpenWhisk seems to be the one that is the most mature and supported, even if it doesn’t support Kubernetes yet. Regarding the three Kubernetes frameworks I presented, I would start from Fission, which seems to be the most promising for now.
Yes, definitely. FaaS and serverless are quickly changing how developers want to build quickly and efficiently. As with every technology out there, it’s not the perfect choice for every scenario, but it can drastically simplify your life and development workflow when you need to build microservices, RESTful APIs, and highly scalable event-driven applications.
I am not aware of any easy debugging strategy for FaaS at the moment. This is probably the hardest thing to do when you start having 10+ functions that react to different events and sources. AWS is actively working to solve the problem in-house with AWS X-Ray (still in preview). Other players such as the Serverless Framework allow you to fetch function logs and inspect them locally, which is more comfortable, but still not easy. Other services and startups – for example, IOpipe – are working hard on the same problem, which involves both debugging and monitoring.
That’s a very good question. I am not sure if we can achieve a more granular unit of delivery than individual functions. Indeed, FaaS might be the ultimate model from the development point of view, although there is plenty of margin for improvement, especially on the underlying layer. The future of FaaS – and development in general – might go from serverless to codeless altogether. That’s a future where everything has already been implemented by someone else, and you just have to put all of the pieces together. At that point, I’m afraid that machines will have already taken over! 🙂
Let us know what you think of FaaS and what you’ve built with it.You can watch the FaaS on Kubernetes webinar here. Don’t forget to watch our webinars if you want to learn more about Kubernetes and Docker.
Today, cloud technology platforms and best practices around them move faster than ever, resulting in a paradigm shift for how organizations onboard and train their employees. While assessing employee skills on an annual basis might have sufficed a decade ago, the reality is that organiz...
How building Cloud Academy helped us understand the challenges of transforming large teams, and how data and planning can help with your cloud transformation.When we started Cloud Academy a few years ago, our founding team knew that cloud was going to be a revolution for the IT indu...
If you want to deliver digital services of any kind, you’ll need to compute resources including CPU, memory, storage, and network connectivity. Which resources you choose for your delivery, cloud-based or local, is up to you. But you’ll definitely want to do your homework first.Cloud ...
Now that you’ve decided to invest in the cloud, one of your chief concerns might be maximizing your investment. With little time to align resources with your vision, how do you objectively know the capabilities of your teams?By partnering with hundreds of enterprise organizations, we’...
It’s no secret that cloud, its supporting technologies, and the capabilities it unlocks is disrupting IT. Whether you’re cloud-first, multi-cloud, or migrating workload by workload, every step up the ever-changing cloud capability curve depends on your people, your technology, and your ...
In the IT world, failure is inevitable. A server might go down, an app may fail, etc. Does your team know what to do during a major outage? Do you know what instances may cause a larger systems failure? Chaos engineering, or chaos as a service, will help you fail responsibly.It almost...
As the sixth annual re:Invent approaches, it’s a good time to look back at how the industry has progressed over the past year. How have last year’s trends held up, and what new trends are on the horizon? Where is AWS investing with its products and services? How are enterprises respondi...
71% of IT decision-makers believe that a lack of cloud expertise in their organizations has resulted in lost revenue.1 That’s why building a culture of cloud—and the common language and skills to support cloud-first—is so important for companies who want to stay ahead of the transfor...
At Cloud Academy, we’re obsessed with creating value for the organizations who trust us as the single source for the learning, practice, and collaboration that enables a culture of cloud.Today, we’re excited to announce the general availability of several new features in our Content L...
Some of the questions by journalists about encryption prove they don't get it. Politicians don't seem to get it either (most of them). In fact, outside technology, there are some ridiculous notions of what encryption means. Over and over again, the same rubbish around encrypti...
Building new hands-on labs and improving our existing labs is a major focus of Cloud Academy for 2017 and beyond. If you search "types of adult learning," you will get approximately 16.9 gazillion hits. Many will boast about how they meet the needs of a certain type of learner (up to 70...
With 83% of businesses ranking cloud skills as critical for digital transformation in 2017, it’s great news for anyone with cloud architecting experience, and for those considering a career in cloud computing. In our new infographic, we compiled some of the latest industry research to l...