You may add more resources or refactor, or perhaps pile up on external services – but that doesn't help when users come back with more requests for new features.
We look at how combining Node.js with Lambda AWS and Serverless can solve some of these problems.
Imagine your developers are adding new features to a project that deals with images – we will use a photo sharing platform for our example.
The features needed will store images and assign them a URL– simple.
But what happens when users request adding cropping and resizing features. Fine!
You find an appropriate solution on the web and link it to your project – but the users come back again, and this time they would like you to implement an image recognition feature which would store the results somewhere.
Things are starting to look complicated – especially when the issue of price comes into play.
This is where AWS comes into play:
Source: AWS Amazon
You can connect all these services and remember the correct logic sequences and exceptions. Obviously, the service must be asynchronous because only after a successful upload will it send an image to the crop service, and later on to the recognition service.
Now we see the problem: many vulnerable dependencies and ‘heavy’ features.
It takes can take a lot of time to develop anything new in such a complex environment – and it’s costly to pay for so many external services.
The answer can be found with these powerful ingredients:
Node.js + Lambda(AWS) + Serverless = a lightweight project
Are the above tools and technologies new to you? No worries, here is our in-depth guide on how to set them up.
Why use Node.js?
It has gained substantial popularity thanks to a vibrant community that makes sure the technology is up-to-date with the latest trends.
Companies such as Netflix, Walmart, Uber, Trello, PayPal, LinkedIn, Medium, and even NASA have leveraged Node.js as the backend for their web applications.
In other words, it’s a platform for building really fast and scalable server applications.
We put together a list of the top 10 companies using Node.js on production to help you understand the types of business challenges this can help resolve.
Why use Lambda?
Lambda(AWS) is a compute service that lets you run code without provisioning or managing servers. AWS Lambda executes your code only when needed and scales automatically, from a few requests per day to thousands per second.
So where's the catch? Well, there is no catch!
Using Lambdas is fully transparent – you pay only for the functions that get triggered:
- The first 1 million requests per month are free of charge
- $0.20 per 1 million requests and $0.0000002 for every request over that amount
Lambda lets you scale your functionalities easily – your team will have no problems securing continuous delivery and integration. If you need more resources you can simply buy more from Amazon AWS.
We helped one of the first Banking-as-a-Platform companies break through in FinTech by taking advantage of AWS features – find out how solarisBank did it and how your company can benefit from no upfront costs.
Why use Serverless?
Serverless offers a stable structure for building and running applications and services without all the hassle of servers.
This means your systems can scale by themselves and react to demand in a more precise way – saving you time and money.
It supports the biggest cloud providers such as:
- Microsoft Azure
- IBM OpenWhisk
We put together an article on how going serverless can effect the app development process to help you decide.
If you want to learn more about the benefits of going serverless check out this guide.
The Perfect Mix
Combining these three tools will let you create flexible, fast and lightweight features on a single platform.
No need to worry about the complexity, because Lambda has an automatic rescale function – Lambda can handle almost an infinite amount of requests and respond to all of them.
With Serverless, we obtain a tool for building new functionalities in one place and can connect Serverless directly to Amazon Web Services – don’t worry about setting up AWS manually, you will find everything you need in the Serverless framework.
Our team are AWS Consultancy Partners and can help you get started with these tools to create a perfect, and lightweight, web application.