Cross Country Road Trip In Hearse Is To Die For

The great American road trip is one of the most desirable and passionate experiences for car enthusiasts young and old alike. All across the nation, there are gearheads willing to push their cars to…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Things You Should Know About Serverless APIs

AWS Lambda has opened a new horizon of possibilities, there a host of things that you can do with Lambda Functions and be creating serverless APIs is one of them.

AWS Lambda + API Gateway combination has made it fairly easy and convenient to create APIs without having to manage any servers resources on AWS.

Possibilities of what we can do with FaaS implementations like — AWS Lambda are endless, but, we aware it’s not a silver bullet. Someone might say that you can and must make all the components of the application your team is working on serverless, but, should you?

Consider the following use case -

These services could be running as serverless functions or Server-based application services. The End-user simply does not care. It for you to decide what tools and technologies you should use.

All of these are valid questions to ask, that should be asked before deciding anything. For example — Why FaaS? Most people want to use Lambda/FaaS because it’s the newest and the hottest kid on the block Or because of everyone else is using it. But, that can’t be the only reason to use Lambda, consider your use-case before deciding.

Now don’t get started with 1 Million requests are free with AWS Lambda. First, 1 million requests per month are free, but, you have to pay for Data transfer cost, cost of other AWS Services that you will be using. Lambda functions are time-boxed (it is configurable). This means you need to spend even more time orchestrating and organizing your functions so that they can work in a distributed fashion on your data, Which will add to the overall cost.

Lambda may be a good solution depending on your use case, but, Lambda or any FaaS solution will tie you with particular Cloud Provider. For Example, it is very convenient to integrate Lambda with Services like — AWS API Gateway, S3 or SNS and a lot of other services. But that means, apart from using AWS Lambda, you will be using these services that are easier to integrate.

It’s good if you or your organization wants to be on AWS or Azure or GCP, you get a very good package deal, but, what if you are just trying out different providers, or your organization does not want to be dependent on a single provider?

In such a scenario, Container Solutions like Docker might be a good alternative for you. Containers give you more control over the environment as well.

This is perhaps the most important Technology question to ask. People tend to ignore this and say “We have used Java/C# a lot traditionally without and we will continue to do same with Lambda”. Well, Serverless API is not your Web Application or API, so, remember a couple of things before you start working on your serverless API -

Here we should consider that there will be 2 cold starts — 1st when API Gateways calls your Lambda Function, 2nd when Your Lambda Calls another Lambda or API Backed by Lambda. If there are 2 Cold Start, then 30 seconds (Gateway Timeout) may not be sufficient, and your users will see Gateway Timeout Error. Also, we are creating a Tightly Coupled Architecture. Instead, try to make a decouple architecture using SNS or SQS, something like:

FaaS implementations like AWS Lambda has many advantages over traditional applications. It may not be feasible to list them all here. However, going serverless requires both in terms of architecture and application design. Tools that you or your team was using with your traditional applications, may or may not be a good fit for serverless applications. So, be flexible in your choice of tools and technologies.

Go give AWS Lambda a try to experience it’s power first hand. When you start planning your Serverless applications, consider all aspects of your applications. Try to keep the architecture decoupled to keep it flexible.

Feel free to get in touch with me if you want to know about — AWS Lambda, Code Pipeline, AWS Cognito, automating your workflow on AWS or any other AWS and Serverless queries.

Add a comment

Related posts:

Momentum Method and Nesterov Accelerated Gradient

In the previous post, Gradient Descent and Stochastic Gradient Descent Algorithms for Neural Networks, we have discussed how Stochastic Gradient Descent algorithm can improve plain Gradient Descent…

The Workings of Voice Broadcasting

If you have a large number of people on your contact list that you need to get in touch with but Voice Broadcasting don’t want to (or can’t afford to) call one at a time, voice broadcasting, an…

Step by step instructions to Pick a Stone work Project worker

Whether you are building another home for your family or trying to clean up the establishment around your home, artisans assume a significant part in the development and rebuilding of homes. This…