Cloud computing, which started with Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service (SaaS), is fast moving into a Function-as-a-Service (FaaS) model where users don’t have to think about servers. Serverless applications don’t require the provisioning, scaling, or management of servers, as everything required to run and scale the applications with high availability is provided by the platform itself. This allows users to focus on building their core products, instead of worrying about the runtime infrastructure demands; and to pay only for the actual compute time and resources consumed, instead of the total uptime.
Serverless is merely an abstraction wherein the users (developers and maintainers in general) have zero or minimal visibility and control on the “server” aspects of their target environment — processes, the kernel, the filesystem, OS configurations, and so forth. From a traditional developer perspective, this may seem like a considerable restriction, but the same abstraction opens up wonderful possibilities for platform providers to optimize their infrastructure utilization (more bang for their buck), and for users to avoid unnecessary charges with per-usage billing. In this sense alone it’s a win-win, not to mention the ensuing resource optimization and “green computing” benefits.
FaaS is solely the computation aspect of serverless, which in itself is quite broad in scope: storage, hosting, relational/non-relational persistence, messaging, API/web service provisioning and management, and even IoT coordination. The first commercially successful serverless (“pay-as-you-go”) platform was Google’s App Engine in 2008 (which is now, arguably, categorized as a PaaS). However, the real surge was in 2014, when AWS announced Lambda as “serverless compute” as a novel, pay-per-execution alternative for pay-per-allocation VMs.
As of now, we see a few major players in the arena: AWS with Lambda (which, not coincidentally, fits nicely with the “as-a-service” stack they have been building since the beginning); Microsoft Azure with its Azure Functions (catching up fast, along with their other service offerings like Azure Storage, CosmosDB, and Event Grid), and Google Cloud Platform with its Cloud Functions and Firebase Functions (the former having gone GA in July this year — although it is seemingly lagging in comparison to its competitors — and the latter being a more “managed” version of the former, tailored for the Firebase backend-as-a-service (BaaS) platform). In addition, we see many new players waiting in line — IBM Cloud Functions based on OpenWhisk, PubNub Functions, MongoDB Stitch, and Function Compute from Alibaba Cloud.
In addition to such public cloud-based providers, there’s an increasing number of do-it-yourself serverless platforms which one can deploy on their own cloud infrastructure — Kubernetes-based Kubeless and Funktion; Apache OpenWhisk; Docker-based Oracle Fn and IronFunctions; even totally novel experiments like OpenFaaS on Raspberry Pi.
Given the pay-per-use model of serverless, it is mostly suited for batch and event-driven workloads. An ideal example is end-of-month payroll processing; rather than running and maintaining a dedicated compute instance (such as a server, container, or platform (PaaS) app) throughout the month, or going through the hassle of starting, configuring, running, and shutting down such an instance just for the EoM batch process (while having to pay for the passive resources for the whole month), the organization can simply deploy a set of serverless components (a function, connected to a pay-per-use data store or source, such as Google Cloud Datastore or AWS DynamoDB). This way, the payroll personnel can simply invoke the function on demand to get their EoM calculations done, and literally forget about it — until the end of next month.
Another remarkable feature of serverless functions is their near-infinite scalability — the ability to scale from virtually nothing to literally tens of thousands of concurrent instances — which makes them perfect candidates for handling highly variant and highly unpredictable loads, such as traffic for a real-time sports score app. In most cases, it is much more economical to have serverless infrastruc- ture handling on-demand loads rather than running, managing, and paying for over-provisioned VM instances or container clusters just to handle a rarely occurring peak load.
Parallel to platforms, serverless frameworks are also booming. The literal Serverless Framework and SAM (Serverless Application Model) from AWS are two of the key players. Both are open-source (although the mechanisms behind SAM are embedded in the opaque AWS platform), have installable CLI components that can be set up to run quickly, and integrate with CI/CD workflows as well. The Serverless Framework supports multiple languages, provides lifecycle management, and is extensible via plugins (already growing into a rich ecosystem), whereas SAM has relatively limited capabilities due to being tightly coupled with AWS and its CloudFormation deployment service. While a basic Serverless Framework app could be portable across cloud platforms (currently AWS, GCP, Azure, and OpenWhisk), customizability and advanced features still have to be achieved via platform-specific configurations.
Additionally, we see different forms of serverless development tools in emergence: frameworks like Apex, Up, and Spring Cloud Functions; design stacks like Project Flogo; IDEs like AWS Cloud9 and SLAppForge Sigma; API-centric tooling like Shep and Lambda Forest; testing tools like SAM Local, and so forth. Anibal maintains an extensive curated list of tooling in his GitHub repo, which is one of the most comprehensive sources for staying current with serverless technologies.
Operational concerns of serverless — security, compliance, monitoring, and management — are just as important as the development aspect. PureSec, Protego, and other security-oriented ventures are introducing security best practices to the serverless world (least privileges for function runtimes, vulnerability analysis, DDoS/attack detection, and so forth) whereas others like Dashbird, IOpipe, and Epsagon are improving the monitoring aspects via unified dashboards, log analysis, automatic alerting and throttling, performance tracking, and cost estimation/prediction.
Many prominent enterprises are already moving parts of their production workloads to serverless. Prominent figures include Coca-Cola, The New York Times, Thomson Reuters, Fuji, and Localytics. So far, these have been mainly focused on event-driven workloads such as analytics, IoT coordination, on-demand image processing, and email sending. However, there are also full-stack examples like OpenGamma and Torii. Furthermore, recent surveys by Serverless, Inc. revealed that, among its respondents, the percentage of enterprise serverless usage has increased from 43% in 2017 to 82% in 2018.
Despite its traction and popularity, it should never be forgotten that serverless is no silver bullet for all your cost and scalability issues. In fact, beyond a certain point, serverless can be more expensive than dedicated provisioning; and this point can be closer to reality than you expect. As a rule of thumb, if your application needs continuous computation at a higher concurrency (the latter being inevitable for cases like HTTP request handling), you are better off running a dedicated compute instance (which can usually serve multiple concurrent requests and generally has access to larger memory and disk capacities as well). Despite the lack of “ops-free” benefits on serverless provisioning, there are written accounts of how untamed scalability can wreak havoc with your bill as well as on how giving up on serverless can cut down your costs by orders of magnitude.
“Going serverless” is not an overnight feat, especially when “serverfull” architecture is already baked into your systems, developers, and maintainers. The “think serverless” initiative should be adhered to from the start of a project, with developers, team leads, architects, and even project managers being well aware of the strengths, limitations, and pitfalls of the serverless “version” of what they are about to implement. Without a well-planned architecture, a serverless system can very easily turn into a mess or a white elephant — the chances are much higher than with a “traditional” server architecture.
Despite all these hardships, pitfalls, and controversies, serverless will survive — and thrive — just like it is doing now. Grab it by its correct end, and you’ll attain your nirvana.
#aws #web-service #microservices #serverless
In the past few years, especially after Amazon Web Services (AWS) introduced its Lambda platform, serverless architecture became the business realm’s buzzword. The increasing popularity of serverless applications saw market leaders like Netflix, Airbnb, Nike, etc., adopting the serverless architecture to handle their backend functions better. Moreover, serverless architecture’s market size is expected to reach a whopping $9.17 billion by the year 2023.
Why use serverless computing?
As a business it is best to approach a professional mobile app development company to build apps that are deployed on various servers; nevertheless, businesses should understand that the benefits of the serverless applications lie in the possibility it promises ideal business implementations and not in the hype created by cloud vendors. With the serverless architecture, the developers can easily code arbitrary codes on-demand without worrying about the underlying hardware.
But as is the case with all game-changing trends, many businesses opt for serverless applications just for the sake of being up-to-date with their peers without thinking about the actual need of their business.
The serverless applications work well with stateless use cases, the cases which execute cleanly and give the next operation in a sequence. On the other hand, the serverless architecture is not fit for predictable applications where there is a lot of reading and writing in the backend system.
Another benefit of working with the serverless software architecture is that the third-party service provider will charge based on the total number of requests. As the number of requests increases, the charge is bound to increase, but then it will cost significantly less than a dedicated IT infrastructure.
Defining serverless software architecture
In serverless software architecture, the application logic is implemented in an environment where operating systems, servers, or virtual machines are not visible. Although where the application logic is executed is running on any operating system which uses physical servers. But the difference here is that managing the infrastructure is the soul of the service provider and the mobile app developer focuses only on writing the codes.
There are two different approaches when it comes to serverless applications. They are
Backend as a service (BaaS)
Function as a service (FaaS)
Moreover, other examples of third-party services are Autho, AWS Cognito (authentication as a service), Amazon Kinesis, Keen IO (analytics as a service), and many more.
FaaS serverless architecture is majorly used with microservices architecture as it renders everything to the organization. AWS Lambda, Google Cloud functions, etc., are some of the examples of FaaS implementation.
Pros of Serverless applications
There are specific ways in which serverless applications can redefine the way business is done in the modern age and has some distinct advantages over the traditional could platforms. Here are a few –
🔹 Highly Scalable
The flexible nature of the serverless architecture makes it ideal for scaling the applications. The serverless application’s benefit is that it allows the vendor to run each of the functions in separate containers, allowing optimizing them automatically and effectively. Moreover, unlike in the traditional cloud, one doesn’t need to purchase a certain number of resources in serverless applications and can be as flexible as possible.
As the organizations don’t need to spend hundreds and thousands of dollars on hardware, they don’t need to pay anything to the engineers to maintain the hardware. The serverless application’s pricing model is execution based as the organization is charged according to the executions they have made.
The company that uses the serverless applications is allotted a specific amount of time, and the pricing of the execution depends on the memory required. Different types of costs like presence detection, access authorization, image processing, etc., associated with a physical or virtual server is completely eliminated with the serverless applications.
🔹 Focuses on user experience
As the companies don’t always think about maintaining the servers, it allows them to focus on more productive things like developing and improving customer service features. A recent survey says that about 56% of the users are either using or planning to use the serverless applications in the coming six months.
Moreover, as the companies would save money with serverless apps as they don’t have to maintain any hardware system, it can be then utilized to enhance the level of customer service and features of the apps.
🔹 Ease of migration
It is easy to get started with serverless applications by porting individual features and operate them as on-demand events. For example, in a CMS, a video plugin requires transcoding video for different formats and bitrates. If the organization wished to do this with a WordPress server, it might not be a good fit as it would require resources dedicated to serving pages rather than encoding the video.
Moreover, the benefits of serverless applications can be used optimally to handle metadata encoding and creation. Similarly, serverless apps can be used in other plugins that are often prone to critical vulnerabilities.
Cons of serverless applications
Despite having some clear benefits, serverless applications are not specific for every single use case. We have listed the top things that an organization should keep in mind while opting for serverless applications.
🔹 Complete dependence on third-party vendor
In the realm of serverless applications, the third-party vendor is the king, and the organizations have no options but to play according to their rules. For example, if an application is set in Lambda, it is not easy to port it into Azure. The same is the case for coding languages. In present times, only Python developers and Node.js developers have the luxury to choose between existing serverless options.
Therefore, if you are planning to consider serverless applications for your next project, make sure that your vendor has everything needed to complete the project.
🔹 Challenges in debugging with traditional tools
It isn’t easy to perform debugging, especially for large enterprise applications that include various individual functions. Serverless applications use traditional tools and thus provide no option to attach a debugger in the public cloud. The organization can either do the debugging process locally or use logging for the same purpose. In addition to this, the DevOps tools in the serverless application do not support the idea of quickly deploying small bits of codes into running applications.
#serverless-application #serverless #serverless-computing #serverless-architeture #serverless-application-prosand-cons
By this point most enterprises, including those running on legacy infrastructures, are familiar with the benefits of serverless computing:
The benefits of agility and cost reduction are especially relevant in the current macroeconomic environment when customer behavior is changing, end-user needs are difficult to predict, and development teams are under pressure to do more with less.
So serverless is a no-brainer, right?
Not exactly. Serverless might be relatively painless for a new generation of cloud-native software companies that grew up in a world of APIs and microservices, but it creates headaches for the many organizations that still rely heavily on legacy infrastructure.
In particular, enterprises running mainframe CICS programs are likely to encounter frustrating stumbling blocks on the path to launching Functions as a Service (FaaS). This population includes global enterprises that depend on CICS applications to effectively manage high-volume transactional processing requirements – particularly in the banking, financial services, and insurance industries.
These organizations stand to achieve time and cost savings through a modern approach to managing legacy infrastructure, as opposed to launching serverless applications on a brittle foundation. Here are three of the biggest obstacles they face and how to overcome them.
Middleware that introduces complexity, technical debt, and latency. Many organizations looking to integrate CICS applications into a microservices or serverless architecture rely on middleware (e.g., an ESB or SOA) to access data from the underlying applications. This strategy introduces significant runtime performance challenges and creates what one bank’s chief architect referred to as a “lasagna architecture,” making DevOps impossible.
#serverless architecture #serverless functions #serverless benefits #mainframes #serverless api #serverless integration
Serverless Computing is the most promising trend for the future of Cloud Computing. As of 2020, all major cloud providers offer a wide variety of serverless services. Some of the FaaS offerings provided withing different cloud providers are AWS Lambda, Google Cloud Functions, Google Cloud Run, Azure Functions, and IBM Cloud Functions. If you want to use your current infrastructure, you could also use the open-source alternatives like OpenFaaS, IronFunctions, Apache OpenWhisk, Kubeless, Fission, OpenLambda, and Knative.
In a previous article, I iterated the most important autoscaling patterns used in major cloud services, along with their pros/cons. In this post, I will go through the process of predicting key performance characteristics and the cost of scale-per-request serverless platforms (like AWS Lambda, IBM Cloud Functions, Azure Functions, and Google Cloud Functions) with different workload intensities (in terms of requests per second) using a performance model. I will also include a link to a simulator that can generate more detailed insights at the end.
A performance model is “A model created to define the significant aspects of the way in which a proposed or actual system operates in terms of resources consumed, contention for resources, and delays introduced by processing or physical limitations” [source]. So using a performance model, you can “predict” how different characteristics of your service will change in different settings without needing to perform costly experiments for them.
The performance model we will be using today is from one of my recent papers called “Performance Modeling of Serverless Computing Platforms”. You can try an interactive version of my model to see what kind of information you can expect from it.
The input properties that need to be provided by the user to the performance model along with some default values.
The only system property you need to provide is the “idle expiration time” which is the amount of time the serverless platform will keep your function instance around after your last request before terminating it and freeing its resources (to know more about this, you are going to have to read my paper, especially the system description section). The good news is, this is a fixed value for all workloads which you don’t need to think about and is 10 minutes for AWS Lambda, Google Cloud Function, and IBM Cloud Functions and 20 minutes for Azure Functions.
The next thing you need is the cold/warm response time of your function. The only way you can get this value, for now, is by actually running your code on the platform and measuring the response times. Of course, there are tools that can help you with that, but I haven’t used them, so, I would be glad if you could tell me in the comments about how they were. Tools like the AWS Lambda Power Tuning can also tell you the response time for different memory settings, so you can check which one fits your QoS guarantees.
#serverless-computing #performance #serverless-architecture #serverless #serverless-apps
Happy Serverless September 2020! We at Coding Sans love working with serverless technology. This is why we decided to publish a report with the latest serverless trends this year. We partnered up with nine other companies who share our love to make it happen.
The idea was to gather insight from the community into the current serverless trends and to learn how others implement this technology. The excitement of the community and our partners exceeded our expectations.
We owe a big thank you to every participant who shared their insight with us, so we can in turn pass it on to you.
This blog post highlights 5exciting serverless trends, but it’s only a taste of all the data we’ve compiled.
Or take a deep dive, and download the full State of Serverless 2020 report to get data on all the 20+ serverless trends we’ve researched. It contains the most popular frameworks, FaaS products, container services, tooling, cloud security, and much more.
In this blog post, we cover the following:
These numbers speak for themselves. Amazon Web Services is miles ahead of everyone else in popularity among cloud providers. Google Cloud Functions and Microsoft Azure Functions have asserted a significant lead over the rest of the field, but they may not be out of reach just yet.
#serverless #nodejs #aws #cloud-computing #cloudservices #serverless-adoption #serverless-architecture #serverless-top-story
Serverless computing promises greater scalability, faster development, more efficient deployment, and lower cost.
But the benefits of going serverless can feel out of reach for companies that rely heavily on Oracle stored procedures: named PL/SQL blocks which perform specific tasks and are commonly used for building complex enterprise applications on top of relational databases.
Exposing stored procedures has traditionally been an arduous and time-consuming task. And conventional solutions tend to lead to a layered and complex architecture that creates challenges at both design time and runtime for serverless functions.
Exposing Oracle stored procedures to other applications as web services has typically resulted in an extremely layered architecture that increases the complexity of the application, leads to reliance on proprietary tools, and increases technical debt.
That’s because the traditional approach to exposing Oracle Stored Procedures has been to wrap the PL/SQL in a proprietary Oracle Application Development Framework (ADF). Building the ADF Business Service, following the standard “Rules,” involves multiple manual steps, like:
This then requires the creation of an XML schema and the use of an XML process to access the ADF business component.
Teams that have gone down this route have typically found that the development process is slow and manual – even with developers with the specialized skills necessary to expose Oracle stored procedures. Relying on external consultants is costly, both upfront and for ongoing maintenance. And either way, this approach results in proprietary vendor lock-in.
#cloud #serverless architecture #stored procedures #oracle soa #serverless benefits #serverless api #serverless integration