Handling 350k Requests for $3 using Lambda

栏目: IT技术 · 发布时间: 5年前

内容简介:Since its launch towards the end of 2014, Lambda has created a lot of hype, and more importantly, brought the term “serverless” into the industry. At its core, “serverless” does not mean that there are no servers or anything; there are servers, but you are

Since its launch towards the end of 2014, Lambda has created a lot of hype, and more importantly, brought the term “serverless” into the industry. At its core, “serverless” does not mean that there are no servers or anything; there are servers, but you are not the one managing those servers. You don’t know where your code is running, you don’t SSH into a server, you don’t do anything that you’d do with regular servers or VMs. You just give a function you’d like to execute to Lambda and let it run the code for you.

As an example, let’s say you have a function that takes a list of products and calculates the price of the whole cart, including various subtotals, shipping prices, and grand totals. If this is one piece of a bigger service, then it might be fine to keep it there. However, if this is a functionality that will be shared between different use-cases, or if this is a full service on its own, then you need to consider how to deploy, manage, and scale it. This exact point is where serverless platforms like Lambda jump in:

  • Build a ZIP archive of your code
  • Upload it to Lambda
  • Map an API Gateway to your lambda function
  • Bam, you are done: you have a service that can scale infinitely, requires no maintenance, and can be deployed straight from a ZIP archive.

Alright, the “ infinite scaling ” part may be a bit stretch. It is still software that is running on physical hardware, and there are a bunch of challenges maintaining a smooth scaling from one request to one million requests per minute , but in practical terms, you as the developer don’t need to care about it, the platform itself will handle that.

Devo: My Ideal Usecase

The reason I have been using Lambda is my side project, Devo . Devo is a simple open-source new-tab extension that displays home pages of a bunch of platforms, such as GitHub Trending , Hacker News , Product Hunt or DEV . I found myself visiting these pages quite frequently, and I thought “ why not have them ready in every new tab? ”, which then lead to the project itself.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Java学习笔记

Java学习笔记

林信良 / 清华大学出版社 / 2015-3-1 / CNY 68.00

●本书是作者多年来教学实践经验的总结,汇集了学员在学习课程或认证考试中遇到的概念、操作、应用等问题及解决方案 ●针对Java SE 8新功能全面改版,无论是章节架构或范例程序代码,都做了重新编写与全面翻新 ●详细介绍了JVM、JRE、Java SE API、JDK与IDE之间的对照关系 ●从Java SE API的源代码分析,了解各种语法在Java SE API中的具体应用 ......一起来看看 《Java学习笔记》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具