When and When not to use Serverless Architecture
serverless image handler

When and When not to use Serverless Architecture

An evolution of Infrastructure-as-a-Service public cloud platforms that eliminates server set-up and maintenance, Serverless has been, alongside?Kubernetes, among the fastest-growing approaches to?cloud development. Serverless architecture is based on the use of Functions-as-a-Service (FaaS) and a quickly growing ecosystem of services that help software development teams build and maintain apps more quickly, reliably, and cheaply.

When compared with traditional apps, serverless apps have many benefits, particularly since developers no longer have to worry about physical and virtual server provisioning and maintenance.

With serverless, a cloud provider handles all the typical scaling and maintenance work -- such as OS updates -- that come along with traditional architectures. Devs also don't have to worry about instance types, resource scaling or the costs of idle computing, which lets them focus on what makes their application unique and the potential features that will enhance its functionality.

But there are crucial decisions that development teams must make before they commit to serverless. These include team staffing, development framework selection and testing methods.

Serverless promises to make cloud development faster, cheaper, more reliable and minimise points of failure. It does so by building on the trend of optimising what a development team has to code from scratch and configure by extending that into infrastructure.

The architectural approach goes a long way to reducing, in many cases almost eliminating, the risk of infrastructure as a point of failure and efficiency bottleneck. Developers can focus on just the app itself, leaving infrastructure provisioning to the FaaS provider, of which the three largest and most mature are the public cloud giants AWS, Microsoft Azure, and Google Cloud Platforms.


When is a Serverless approach worth considering?

A Serverless approach could be worth serious consideration under the following circumstances:

  • You are developing small to mid-sized applications
  • Loads are unpredictable
  • The application requires a lot of quick (fail-fast) experimenting
  • You have a team prepared and able to leverage Serverless advantages

When is Serverless architecture probably not the right approach?

Broadly speaking, Serverless architecture is probably not the optimal choice for your next app if:

Workloads will be constant?– Serverless’s strength is scaling infrastructure up and down for dynamic loads that peak and trough throughout the day or have strong seasonality.

Avoiding vendor lock-in is strategically important?– the most mature Serverless platforms are part of the big public cloud vendors AWS, Azure and GCP and not compatible with each other. Even the open-source offering by OpenWhisk isn’t compatible with other platforms, though there is hope that Serverless will eventually benefit from the same kind of community standards as the?OCI?introduced for containers.

Advanced monitoring required –?despite the growing number of?Serverless monitoring tools?available, both third party products and those offered by Serverless providers, feature sets remain relatively rudimentary. Serverless architecture may not be the best choice for your right now if robust environment monitoring is a priority even if tools will undoubtedly improve.

You will have long-running functions –?one of the most significant limitations of Serverless functions is that code instances can only run for limited amount of time – up to 15 minutes for Lambda. While that’s enough for a majority of workloads, it may fall short of the needs of some applications. Longer workloads can also be more expensive on a Serverless platform compared to a standard cloud service because the pricing model is designed for short-lived functions.

You plan to use programming languages not supported by Serverless platforms?– Serverless platforms only support code written in a selection of core programming languages which makes it a problematic choice of architecture for apps written in other languages. APIs, wrapping and other tricks can be used to run other programming languages but are usually cumbersome solutions and best avoided.

Common Serverless use cases

Serverless architecture is increasingly popular for use cases like analytics pipelines and?Big Data?(map-reduction problems, high speed video transcoding, stock trade analysis, and compute-intensive Monte Carlo simulations for loan applications) as well as:

  • Web applications
  • Backends
  • Data processing
  • Chatbots
  • Virtual assistants like Amazon Alexa and Google Assistant
  • IT automation

In conclusion

The decision to migrate legacy apps to Serverless architecture or adopt Serverless computing for new projects should be well-considered. To benefit from a Serverless approach you have to clearly understand why your project may need it, how it is implemented and what drawbacks you may have to contend with.

I hope you enjoy the read? share and SUBSCRIBE to saturday with codes.


coming up next AWS lambda serverless architecture on production.



Patrick Cody, PhD

AI/ML Engineer / Data Scientist / Researcher in translational hearing health sciences

1 年

Helpful perspective, thank you for sharing!

Deshuai Hong

React & Node engineer

1 年

Is serverless cost effective for small applications?

回复
KRISHNAN N NARAYANAN

Sales Associate at American Airlines

1 年

Thank you for posting

回复
Tulsi Soni

Become Millionaire using AI | Top Performance Product Hunt Management Voice | LinkedIn & X Growth Expert ? biz : [email protected] ??

1 年

??

回复
Shivam Pal

Full Stack Developer | MERN | Web Development Expert | Problem Solver | AI Enthusiast || Seeking Job Opportunities

1 年

Very Useful ???? Eleke Great

要查看或添加评论,请登录

Eleke Great的更多文章

社区洞察

其他会员也浏览了