Platform As A Service
Platform As A Service
Software developers are always worrying about infrastructure issues and server maintenance,
but now they can forget about all this administrative overhead. With serverless computing, their
dreams about focusing entirely on writing code can finally come true.
In this article, we explain the principles of serverless computing, underscore the pros and
cons of this technology, and provide an overview of its short-term prospects.
This article will be useful for developers who are considering using serverless technology as
well as for organizations that are looking for easy and fast software development.
The term serverless computing is a misnomer as the technology uses servers, only they’re
maintained by the provider. Serverless computing is considered a new generation of Platform as a
Service, as in this case, the cloud service provider takes care of receiving client requests and
responding to them, monitoring operations, scheduling tasks, and planning capacity. Thus,
developers have no need to think about server and infrastructure issues and can entirely concentrate
on writing software code.
Serverless architecture run applications that depend on external Function as a Service and
Backend as a Service providers, which run the application code in temporary containers.
API gateway — This is a fully managed service that’s used to define, deploy, and maintain
APIs. For API integrations, developers use standard HTTPS requests that connect their
presentation tier with the functions they write on a serverless platform. Some serverless
providers like Amazon offer their own API gateways for their clients.
Function as a Service (FaaS) — This is the layer that executes the application code
(business logic) through multi-protocol triggers. Function instances are provisioned on
request (in a few milliseconds) in сompliance with associated configurations.
Backend as a Service (BaaS) — This is a cloud computing service model that serves as a
cloud-based distributed database, eliminating the need for administrative overhead. BaaS
features include cloud storage, push notifications, server code, user and file management,
and many other backend services. These services have their own APIs so developers can
easily integrate them into their applications.
FUNCTION DEPLOYMENT
FaaS functions are executable on a container with few resources. Functions are
triggered through requests and events when necessary without requiring the application to
be running all the time. Requests that can trigger FaaS functions are specified by the
provider. For instance, such triggers can be inbound HTTP requests, scheduled tasks, S3
updates, or messages added to a message bus. Functions can also be invoked via a
platform-provided API, externally, or within the cloud environment.
FUNCTION LIMITATIONS
Amazon’s Lambda is the most mature serverless platform on the market. It supports a
variety of programming languages including Java, Python, and Node.js. Lambda takes
advantage of most AWS services and allows developers to apply its functions as event
handlers as well as to provide glue code when composing services.
IBM Cloud Functions is another serverless deployment that acts as an event action platform
for creating composite functions. It supports Node.js, Java, Swift, Python, and arbitrary
binaries embedded in a Docker container. Cloud Function is based on OpenWhisk, which
is available on GitHub under an Apache open source license.
Microsoft Azure Functions lets developers write code for functions like processing images,
sending emails, and maintaining files that are executed on schedule or when needed. The
platform provides HTTP webhooks, integration with Azure, and support for such
programming languages as .NET, Go, Node.js, Python, PHP, and Java. The runtime code is
open-source and is available on GitHub under an MIT License.
Google Cloud Functions is a computing platform that provides basic FaaS functionality to
run serverless functions written in Node.js in response to HTTP calls and events from
Google Cloud services. It provides development tools such as prediction APIs, translation
APIs, and data storage.
In addition to these serverless providers, there are several other serverless projects
including OpenLambda, Webtask, LeverOS, Pivotal Cloud Foundry 2.0, Spotinst Functions,
and Gestalt Framework.
Serverless computing is more beneficial than existing cloud services as it offers better
application performance along with reduced operational costs. Let’s consider other benefits of cloud
computing that attract so much attention to this technology.
Despite the many benefits, you should understand that serverless computing is a relatively new
technology that also has certain challenges.
Costs of serverless services — While serverless computing can significantly reduce your
development costs, this isn’t always true with different cloud computation approaches. For
instance, serverless functions are currently most attractive for CPU-bound computations,
while I/O bound functions are not as affordable as on dedicated virtual machines or
containers.
Cold start — The key benefit of serverless computing is its ability to scale to zero so that
developers don’t need pay for idle time. However, this may lead to increased invocation
latency due to cold starts. For instance, it may occasionally take up to ten full seconds to
run the first invocation of a JVM-implemented function. Preemptive warming up could be
a good solution to this problem, but developers may have to pay penalties for getting their
serverless code ready to run. Another solution could be using tools that can predict system
load and analyze the duration of load spikes.
Resource limits — Resource limits are necessary to ensure that the platform can deal with
spikes and withstand attacks. Serverless computing imposes limits on memory, function
execution time, bandwidth, and CPU usage. For instance, the maximum execution time per
request is 300 seconds (or 5 minutes) for Azure Functions and AWS Lambda.
Inadequate application testing — Though it’s easy to test different functions of an
application, it may be challenging to test the infrastructure and the combination of all
functions. The reason for this is the complexity of the serverless architecture, which makes
it difficult to manage the countless endpoints in different environments.
Increased security concerns — There are high security risks in a serverless environment, as
many users run their functions on a shared platform. Thus, if someone loads malicious
code, it may negatively affect all cloud users.
Vendor compatibility — FaaS providers operate on different platforms and support different
programming languages. Thus, software changes may be inevitable if developers want to
change providers.
Monitoring and debugging — Since developers have no control over the provider’s servers,
there are limited opportunities for identifying problems and bottlenecks. After a function is
executed, it only leaves traces in logs recorded by the serverless platform. In addition,
there’s a lack of debugging tools that can operate in serverless environments. This is
because debugging distributed systems requires access to a substantial number of relevant
metrics in order to identify the root causes of problems.
Function state — While real applications require state, it’s not clear how to manage state in
serverless functions, as they’re stateless. In order to overcome this challenge, programming
models, libraries, and tools need to provide the necessary levels of abstraction.
Execution time limitations — Serverless functions are limited in their execution time, but
not all applications can run only with short-running functions. There are cases when long-
running logic is necessary, for instance for financial or emergency applications.
Availability of skills — Serverless computing is a fairly new business, so there’s a lack of
developers on the market with skills in serverless programming. Software companies may
have to invest in training their developers in order to catch up with new business trends.
Composability — Some functions are designed to call other functions and coordinate the
execution of several functions that may result in parallel execution. To overcome this
challenge, it’s necessary to use tools that can facilitate the creation and maintenance of
compositions.
Multi-tenancy concerns — In addition to your application, a serverless provider also
supports other clients. Thus, there’s a risk that your software will be placed on the server
along with function-heavy applications that may cause slow performance.
Access to the file system level — A serverless architecture isn’t the best choice for software
that requires access to the file system or operating system level. These types of applications
need to do things such as read attributes from configuration files or split in-memory cache
to disk, but serverless functions don’t allow for this.
IBM analysts predict that the serverless market will grow seven- to ten-fold by 2021.
Moreover, Markets and Markets also projects substantial growth in the serverless market to $7.72
billion by 2021.
Gartner predicts that serverless computing will reach the peak of its productivity in two to
four years and that it will be implemented in areas beyond IT. In addition, Tim Wagner, General
Manager of AWS Lambda, reported at ServerlessConf 2017 that serverless adoption is moving ten
times faster than the adoption of containers. He also pointed out that there’s an impressive trend of
FaaS adoption in enterprises.
IT industry experts also predict that we’ll see the first uses of serverless software by the end
of 2018. Serverless computing can be used for developing image-rich applications, virtual
assistants, chatbots, web apps, and websites. In addition, the technology can be applied to mobile
backends, media and log processing, IT automation, and real-time streaming data processing.
In addition, there are expectations that serverless computing will stimulate the development
of applications for advanced technologies. Particularly, this technology can help simplify the
complexity of big data thanks to its elastic auto-scaling. It’s best suited for software that doesn’t run
continuously but rather has quiet periods and peaks of traffic. So serverless platforms can be used for
developing applications that easily integrate with various advanced technologies like Internet of
Things devices, cognitive intelligence, data analytics, and mobile devices.
Most, but not all, serverless vendors offer compute runtimes, also known as function as a
service (FaaS) platforms, which execute application logic but do not store data. The first "pay as you
go" code execution platform was Zimki, released in 2006, but it was not commercially successful. In
2008, Google released Google App Engine, which featured metered billing for applications that used
a custom Python framework, but could not execute arbitrary code. PiCloud, released in 2010, offered
FaaS support for Python.
AWS Lambda, introduced by Amazon in 2014, was the first public cloud infrastructure
vendor with an abstract serverless computing offering.
IBM offers IBM Cloud Functions in the public IBM Cloud since 2016.
Microsoft Azure offers Azure Functions, offered both in the Azure public cloud or on-premises via
Azure Stack.
In addition, there are a number of open source serverless projects with various levels of
popularity and usage:
OpenWhisk was initially developed by IBM with contributions from RedHat, Adobe, and
others. OpenWhisk is the core technology in IBM Cloud Functions.
Several serverless databases have emerged in the last few years. These systems extend the
serverless execution model to the RDBMS, eliminating the need to provision or scale virtualized or
physical database hardware.
Cost
Serverless can be more cost-effective than renting or purchasing a fixed quantity of servers,
[19]
which generally involves significant periods of underutilization or idle time. It can even be more
cost-efficient than provisioning an autoscaling group, due to more efficient bin-packing of the
underlying machine resources.
This can be described as pay-as-you-go computing or bare-code as you are charged based
solely upon the time and memory allocated to run your code; without associated fees for idle time.
Immediate cost benefits are related to the lack of operating systems costs, including: licences,
installation, dependencies, maintenance, support, and patching.
In addition, a serverless architecture means that developers and operators do not need to
spend time setting up and tuning autoscaling policies or systems; the cloud provider is responsible
for scaling the capacity to the demand. As Google puts it: ‘from prototype to production to planet-
scale.
As cloud native systems inherently scale down as well as up, these systems are known as
elastic rather than scalable.
Small teams of developers are able to run code themselves without the dependence upon
teams of infrastructure and support engineers; more developers are becoming DevOps skilled and
distinctions between being a software developer or hardware engineer are blurring
Productivity
With function as a service, the units of code exposed to the outside world are
simple functions. This means that typically, the programmer does not have to worry
about multithreading or directly handling HTTP requests in their code, simplifying the task of back-
end software development.
Performance
Infrequently-used serverless code may suffer from greater response latency than code that is
continuously running on a dedicated server, virtual machine, or container. This is because, unlike
with autoscaling, the cloud provider typically "spins down" the serverless code completely when not
in use. This means that if the runtime (for example, the Java runtime) requires a significant amount
of time to start up, it will create additional latency.
Resource limits
Diagnosing performance or excessive resource usage problems with serverless code may be
more difficult than with traditional server code, because although entire functions can be timed,
[2]
there is typically no ability to dig into more detail by attaching profilers, debuggers or APM tools.
Furthermore, the environment in which the code runs is typically not open source, so its performance
characteristics cannot be precisely replicated in a local environment.
Security
This is intensified by the mono-culture properties of the entire server network. (A single flaw
can be applied globally.) The solution to secure serverless apps is close partnership between
developers, DevOps, and AppSec, also known as DevSecOps. Find the balance where developers
don’t own security, but they aren’t absolved from responsibility either. Take steps to make it
everyone’s problem. Create cross-functional teams and work towards tight integration between
security specialists and development teams. Collaborate so your organization can resolve security
risks at the speed of serverless.
Privacy
Standards
Vendor lock-in
Serverless computing is provided as a third-party service. Applications and software that run
in the serverless environment are by default locked to a specific cloud vendor. Therefore, serverless
can cause multiple issues during migration.
CONCLUSION
Serverless computing is a novel and promising approach to software development. The technology
eliminates the complexity of dealing with servers and reduces development costs. It lets developers
concentrate on development and stop worrying about budget limitations thanks to pay-per-use
billing. Though serverless computing is a new technology full of challenges, the Apriorit team has
already used it in our projects. If you’re looking for cost-effective yet high-quality and time-efficient
software development, we can offer you our services.
REFERENCES:
https://www.geeksforgeeks.org/serverless-computing/
https://serverless.com/learn/why/?
gclid=EAIaIQobChMIopib4OCF5gIVWwwrCh21nwRLEAAYAiAAEgJWLfD_BwE