We have been working with AWS services particularly EC2, S3, DynamoDB, and Kinesis Streams. Recently, we started looking at AWS Lambda and found it to be awesome in the microservices architecture that we are going towards.
"By allowing us to only consume resources when our code is invoked...we reduce our resource consumption and increase our billing efficiency."
The benefits that Lambda offers are truly awesome and significant. Simply put, without having to worry about configuring, provisioning, or doing any kind of grunt work to setup/launch AMIs, we can improve upon benefits of on-demand resource accessibility and cost control that AWS offers. By allowing us to only consume resources when our code is invoked instead of having at least one instance running all the time we reduce our resource consumption and increase our billing efficiency.
As an example, we have apps that rely on various business/eligibility rules; some of these become quite repetitive in nature like eligibility verification, funding availability, location capabilities etc. Historically, these have been bundled in a common library added as a dependency to the applications. However, as we move to a microservices based auto-scaling architecture using AWS, we are finding this to be a bit limiting.
To make life easy, and remove the library dependency from our applications, we began generating individual services for some of these complex business rules accessible through RESTful end-points. This has been working great for us and definitely a vast improvement over our previous design. Now, using Lambda, we are taking it a step further. Instead of keeping running instances of these microservices at all times, we have uploaded the code for them to AWS Lambda.
Now whenever our apps need access to these services we simply invoke the code uploaded to Lambda and we are good to go. No more multiple instances of same code or library dependencies between apps, or idle running instance etc. The code for the service is uploaded to one point, accessed through one point, and is only executed when needed saving us cost, resource consumption, and overhead.
This is just one example of how we have started leveraging AWS Lambda fitting nicely into the microservices architecture and approach that we have going. Of course, this is not to say this is the only way to do this, but if you are already using AWS, this is an awesome service and definitely worth looking into.
No comments:
Post a Comment