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.


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

查看所有标签

猜你喜欢:

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

数据之美

数据之美

邱南森 (Nathan Yau) / 张伸 / 中国人民大学出版社 / 2014-2-1 / CNY 89.00

这是一本教我们如何制作完美可视化图表,挖掘大数据背后意义的书。作者认为,可视化是一种媒介,向我们揭示了数据背后的故事。他循序渐进、深入浅出地道出了数据可视化的步骤和思想。本书让我们知道了如何理解数据可视化,如何探索数据的模式和寻找数据间的关联,如何选择适合自己的数据和目的的可视化方式,有哪些我们可以利用的可视化工具以及这些工具各有怎样的利弊。 作者给我们提供了丰富的可视化信息以及查看、探索数......一起来看看 《数据之美》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码