Serverless for Startups: An Evolutionary Way to Build Successful Products

Cloud June 4, 2021
Serverless Startups

Serverless for Startups: An Evolutionary Way to Build Successful Products

From FinTechs to eCommerce giants, serverless has use cases in every business verticals. Breaking down large applications into self-contained functional units makes serverless an exemplary architecture for a startup that needs quicker iterations.

When it comes to adopting serverless technologies, many startups get inspired by the use cases of successful tech giants, while others choose to customize architecture. 

However, according to a recent discussion on Reddit, one user points out, “many startups fear from imitating/adopting tech giant’s tech stack and architectures. This is usually under the assumption that they are going to have tech giant challenges which may potentially close down their business.

Yet, this is neither entirely true nor false. When you are choosing serverless for a startup, understanding the compatibility of the tech stack with your business requirements is vital. 

We’ll discuss the core principles of serverless, its advantages, and different serverless vendors with this blog. Let’s first start with the evolution of serverless and how it changed the development landscape.

Evolution of Serverless Technology

“Serverless” was first mentioned in a piece written by Ken Fromm in 2012. The road to the evolution of serverless started back in the 1990s and not in 2012. Software development back in the ’90s saw organizations separating frontend and backend. It was great for development purposes, but firms were paying for an idle resource that could not scale down according to the traffic.

Problems of scaling on-demand computing resources were first addressed through the introduction of VMs in the 2000s. Although, the actual evolution of computing resources began after introducing EC2, S3, and SQS. 

However, the real breakthrough was the launch of AWS Lambda in 2014. AWS Lambda is an on-demand cloud computing resource that offers FaaS capabilities. Earlier, operation teams allocated the resources based on demand forecasting, which had overhead issues, and the computations were not to exceed the system’s capabilities. AWS Lambda helps you handle the system’s restrictive capabilities by offering computing resources that scale up or down in real-time.  

Eventually, the subsequent launch of Google Cloud Platform and Microsoft Azure created more options for startups in the market. Since then, the evolution of serverless has seen a significant boost. 

According to Martin Fowler, there are two overlapping areas which serverless encompasses,

  1. Serverless was first used as a concept that describes the application with integrated third-party services and cloud-hosted apps which manage server-side logic. Such services are often described as the “(Mobile) Backend as a Service” or BaaS.
  2. Serverless can also be described as an architecture where server-side logic is written from scratch and is run in stateless compute containers that are event-triggered and fully managed by third-party services. It is often referred to as “Functions as a Service” or “FaaS,” and one of the most significant examples of its implementation is AWS Lambda.

BaaS and FaaS offer a similar attribute of no need for resource management, but they are different in their approach. Backend-as-a-Service (BaaS) is a serverless architecture where the service provider manages all behind-the-scenes aspects of web or mobile apps. BaaS vendors offer pre-written software that automatically manages user authentication, database management, remote upgrading, and even cloud hosting.

FaaS also allows you to write codes but rather than completely outsourcing the backend, it offers a modular approach. So, you can write and update a piece of code on the fly in response to an event like a user clicking on the download button in a web application. FaaS makes it easy for you to implement code and scale it through the execution of microservices.

serverless startups

In a monolithic architecture, the entire code is interconnected in the form of one large system, which creates a hefty deployment process each time you want to update a function or a feature. On the other hand, FaaS leverages the microservice architecture-based approach. Since functions are independent, developers can work on individual components without affecting the entire system, providing a higher turnaround time in the long run.

Benefits of Serverless Architecture

Choosing serverless architecture for your startup is a business decision and takes more than just one advantage. There is no doubt that serverless does offer a hassle-free development facility and enables quicker development with BaaS and FaaS. But, is that all? Or are there more perks of choosing serverless? Let’s discover!

Agility of Deployments

Conventional architecture does not allow you to make changes quickly and deploy them due to several dependencies. At the same time, a serverless architecture, due to its microservice nature, helps deploy quick changes offering higher agility. 

Many organizations like Netflix, Gilt, PayPal, and Condé Nast were facing difficulties in quickly updating the functionalities of their websites due to monolithic architecture. So, six years back, they switched to microservices architecture with serverless technologies to achieve higher agility. 

Or, take an example of Telenor’s adoption of the serverless architecture built on AWS. The telecommunication firm wanted a solution that can help them improve agility in deployments and reduce time-to-market. After initial configuration to AWS EC2, and AWS S3, Telenor’s team quickly realized that though these AWS services helped them scale, they had to spend more time managing infrastructure.

So, Telenor’s development team leveraged microservices architecture with serverless setup through services like AWS IoT, AWS Lambda, Amazon Kinesis, and Amazon Elasticsearch Service. The fully automated serverless architecture enables managed IoT cloud services for Telenor Connexion’s IoT devices. 

With serverless technology from AWS, Telenor was able to,

  • Reduced 80% of technical issues for their IoT clients
  • Cut the time-to-market for their data analytics platform by 50%
  • Achieved complete ROI within 6 months of the time period.

You May Also Like: “How to Avoid AWS Lambda Cold Starts?

Modular Approach

Monolithic systems have a UI on the client-side, an app on the server-side, and a database where the data is stored. The app processes user requests for data access and retrieves them from the database. These requests are in HTTP format and after processing app sends it to the browser, which offers data to the user.

At the same time, serverless handles HTTP requests with APIs and messaging. Hence, it is safer to say that serverless applications are inherently scalable due to the modular approach. 

When conventional apps scale higher, they develop complicated connections which are not present in the serverless. It allows you to split the architecture and quickly scale horizontally, maintaining the components separately.

serverless startups

High Adaptability

In a conventional setup, developers are assigned specific task which restricts them in terms of operability. At the same time, the serverless architecture allows developers to work on multiple parts of an application which helps in continuous monitoring and deployments of updates. These qualities of serverless being highly adaptable and specialized make it suitable for product development for startups. 

In 2008, Adrian Cockroft, ex-Cloud Architect at Netflix, mentioned that the DVD rental company couldn’t ship titles due to corruption in their database. So, rather than building massive data centers, Netflix decided to deliver videos through a microservice architecture based on serverless technology. It resulted in one of the most reliable streaming services in the world.

Pay Per Use Model

Application infrastructure demands can be complex. If you’ve inconsistent traffic spikes, paying for enormous infrastructure and storage may not make any sense. With serverless, you can bring down the operational expenses by leveraging the pay-as-you-go model.

Serverless for startups

Conventional pricing models for virtual machines charge fixed amounts, while serverless offers different models based on what you use. For example, a traditional dedicated server might be running 24/7 to ensure the statefulness of the application, and whether you use the availed services or not, it remains chargeable. 

At the same time, AWS Lambda employs stateless operations that terminate after its purpose is over. So, you pay only for what you use. Each AWS Lambda function is configured on the basis of memory usage and execution time in milliseconds.

In more straightforward terms, it is like paying for a complete pizza when you have the appetite for only one slice, and that is where serverless creates a paradigm shift. Reduction in the OpEx also depends on the type of services you choose for your startup. As every vendor in the market has a different pricing model and features. So, let’s understand some of the most popular offerings in the serverless ecosystem.

Find out more about the AWS Lambda pricing and how much it will cost to run a serverless application?

Serverless Platforms For Startups

Serverless platforms offer complete resource management and features that help in the automation of functions. Many popular platforms have features and tools that can help develop your serverless applications without much hassle. 

#1. AWS Lambda

AWS Lambda is a serverless computing platform from Amazon that runs custom code in response to events. It is offered as a part of the Amazon Web Services and extends these services with custom logic. You can also create custom backend services for your business with AWS Lambda. It automatically runs code in response to multiple events like HTTP through Amazon API Gateway, modification of objects in Amazon S3 buckets, and others. It supports programming languages like Python, Node.js, Java, Go, C#, and Ruby. Startups can also leverage AWS Lambda for SaaS(Software-as-a-Service) web platforms and Node.js application development.

For a startup that is focused on product development, AWS Lambda helps with

  • Administration of computing resources
  • Running of code automatically on high-availability compute infrastructure.
  • Server and OS maintenance
  • Capacity provisioning and auto-scaling of resources
  • Code and security patch deployments
  • Code monitoring and logging

Pros:

  • Pricing depends on memory provisioning and the number of computing resources used when users interact with the app.
  • Resource management is completely taken care of by the platform allowing startups to make changes on the fly.
  • Ease of code deployment and management through AWS custom editor, Eclipse IDE, Visual Studio IDE, and AWS Command-line interface.
  • AWS ecosystem advantage with different service integrations and ease of using Lambda function with them.
  • Integration with AWS API gateway helps in connecting the function with API and process HTTP requests.

Cons:

  • Ability to execute complex functions makes developers forget about the code readability and create a monolith function on AWS Lambda.
  • Automation of function by the platform does not offer higher customizations for product owners.

#2. Google Cloud Functions

Google Cloud Function(GCF) is a serverless platform that helps in building event-based microservices. It offers a pay-as-you-go FaaS to run your code with no need for server management from Google. 

GCF can be written using different programming languages like Javascript, Python3, Go, or Java runtimes. You can run your functions in any Node.Js, Python, or Go environment, making it portable and enabling quicker local testing. 

GCF can be divided into two types,

  • HTTP Functions: It can be triggered by calling the HTTP URL assigned for a specific function. 
  • Background Functions: External events or cloud services trigger background Function. For example, adding or deleting an image file into your cloud storage triggers the background function.

Google Cloud Functions can react to the events published on other cloud services or third-party services, making it an excellent choice for startups looking to leverage the hybrid cloud.

Pros:      

  • GCF’s discounted price is lower than other platforms, along with the compatibility of free tools like Firebase and Filestore.
  • Instant updates are offered due to the capabilities of Google’s FIrebase that alerts on every update in real-time.
  • GCF is built on Knative, an underlying model for Google’s runtime that enables more use cases and is not restricted to FaaS.
  • Integration with Stackdriver offers monitoring, tracing, and logging tools for app diagnostics. 

Cons:

  • Limited features than other platforms in the market like AWS Lambda
  • Lack of performance indicated by some benchmarks in comparison to other platforms.

#3. Azure Functions

Azure functions is another serverless compute service just like AWS Lambda and GCF. It allows you to deploy a code piece without the need to maintain server infrastructure, web server, or any other resource. You can write Azure functions in programming languages like C#, Java, JavaScript, TypeScript, and Python. The platform has inherent scalability and automatically allocates compute resources as per user requests. 

Pros:

  • Supports stateful applications for enterprise-grade deployments rather than just focussing on the FaaS. 
  • Default configuration of the Authentication in the platform offers less overhead for organizations.
  • Versatility of the functions which allows deployment across App Service (PaaS), Kubernetes, Azure Stack, and IoT Edge

Cons:

  • Enterprise Focus of premium and dedicated pricing plans make it expensive for startups. At the same time, low-end plans have restricted features.
  • Capping of consumption plans on the premium plans is much restrictive than other platforms in the market.

#4. Alibaba Functions

Alibaba functions are one of the most popular serverless platforms that offer real-time scaling of computing power. It is a fully managed and event-driven compute service that startups can leverage for code flexibility. With Alibaba functions, you can simply focus on writing and uploading the code without worrying about resource management. Apart from the generous amount of free resources that come with the serverless platform, there is no fee incurred for up to 1,000,000 invocations, and 400,000 CU-second compute resources per month.

Pros:

  • Easy to develop trigger functions with pre-built SDK or compute API
  • Better compliance with local regulations in China and Asia
  • Supports popular development languages like Node.js, Java, Python, PHP

Cons:

  • Pricing plans are more expensive than AWS Lambda and lack flexibility.
  • Limited APIs offered by the serverless platform make it difficult to integrate external services.

#5. Apache OpenWhisk

Apache Openwhisk, earlier known as the IBM Openwhisk, is an open-source distributed serverless platform that executes IBM functions in response to events triggered by user requests at any scale. It manages the infrastructure, servers, and scaling of the resources using Docker containers.

So, you can build applications and focus on code building without the need for compute resource management. The backend functions which execute the business logic are called “Actions,” which can be triggered through external events. HTTP requests for audio feeds, video, or even uploading an image on app UI can be considered external events.

Pros:

  • Flexibility to make changes to a component without disturbing the entire app function and test its performance simultaneously.
  • Openwhisk’s GUI helps users to leverage the command-line comfortably with a rich interface.
  • No vendor lock-in due to the open-source nature of the serverless platform
  • Customizations offered by the platform are more significant than other serverless platforms. If a feature does not align with your requirements, you can write it from scratch.

Cons:

  • Lack of maturity makes the functionality unstable and restricts the performance.
  • Tech limitations on compute resources are present. For example, the maximum execution time is five minutes for a code size of 48 MB and 5000 triggers per minute. 

Conclusion

Adopting serverless technologies is not an easy decision. As a CTO or CEO, you should understand the business requirements, existing infrastructure, and future needs for expanding the startup. All these factors contribute to the decision of whether to choose serverless or not.

However, you can opt for serverless if,

  • You want to create an app that can process multi-media with ease.
  • You need to have comprehensive data logging capabilities in your application.
  • You are creating an IoT(Internet of Things) application to respond to sensor input messages.
  • You want a streaming service app with parallelly working functions.
  • You need a chatbot that can scale on-demand as per peak traffic.

These are just the tip of the iceberg. Serverless is not restricted, and its possibilities are endless. If you have specific requirements for your application, then at Simform, we have reliable serverless solutions that might help. For any further information or questions, please leave a comment or contact us

AWS Lambda Pricing

Ecosystem of Serverless Technologies

Working from last 8 years into consumer and enterprise mobility, Hardik leads large scale mobility programs covering platforms, solutions, governance, standardization and best practices.

Your email address will not be published. Required fields are marked *

Areas We Serve