博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
超微服务器主板启动无反应_我如何构建无服务器启动
阅读量:2521 次
发布时间:2019-05-11

本文共 6745 字,大约阅读时间需要 22 分钟。

超微服务器主板启动无反应

by Vikram Rangnekar

由Vikram Rangnekar

我如何构建无服务器启动 (How I Built a Serverless Startup)

Let me cut right to it, Serverless is a buzzword. But it’s also a great way to refer to a massive change in how we build software. Yes, there are still servers involved, we haven’t gotten rid of those. The difference is that you don’t concern yourself with them. Serverless is about focusing on your code not the infrastructure that it runs on. You’re leasing just enough computing power to do your job when you need it.

让我切入正题,Serverless是一个流行词。 但这也是引用我们构建软件方式的巨大变化的好方法。 是的,仍然涉及服务器,我们还没有消除这些服务器。 不同之处在于您不必担心它们。 无服务器是关于代码而不是运行代码的基础结构。 您只需租用足够的计算能力即可在需要时完成工作。

Serverless computing is the ability to call from a vast pool of resources. Lease the right amount of resources to do your job at the moment you need it. And hand it back as soon as you’re done.
无服务器计算是从大量资源中进行调用的能力。 租用适当数量的资源以在需要时进行工作。 完成后将其交还。

I discovered Serverless computing back in 2008, when Google released a product called App Engine. We were struggling with infrastructure for our startup and App Engine looked interesting. We ended up building our entire product “Socialwok” on it. It was then I first realized how great an advantage it is to build products using Serverless tech.

我在2008年Google发行了一款名为App Engine的产品时发现了无服务器计算。 我们正在为初创公司的基础架构苦苦挣扎,App Engine看起来很有趣。 我们最终在其上构建了整个产品“ Socialwok”。 那时我首先意识到使用无服务器技术构建产品的巨大优势。

Things have come far since then and we are moving into a Serverless future. Not having to concern yourself with managing infrastructure helps you move faster and be more creative. I was so convinced about this that I wrote a whole book to preach the power of managed infrastructure.

从那时起,事情已经过去了,我们正在迈向无服务器的未来。 不必担心管理基础结构,可以帮助您更快地移动并更具创造力。 我对此深信不疑,以至于写了一本书来宣扬托管基础架构的强大功能。

To take this idea further I decided to build a Serverless startup. A product that consumes very little resources and will scale to millions of users if need be. When going serverless there are a few options you can pick from. Amazon Lambda and Google Firebase plus Cloud Functions are the two popular options. I chose to go with Google as I’m more familiar with their tech.

为了使这个想法更进一步,我决定建立一个无服务器启动。 一种产品消耗的资源很少,并且在需要时可以扩展到数百万个用户。 当进入无服务器状态时,您可以选择一些选项。 Amazon Lambda和Google Firebase以及Cloud Functions是两个流行的选项。 我选择与Google合作,因为我对Google的技术更加熟悉。

The product I built is a tool to help you get organized. Think of it as simpler spreadsheet. I wanted to keep this product free and accessible to everyone. If a million people decided to use it, then it should cost me very little to serve them.

我构建的是帮助您井井有条的工具。 认为它是更简单的电子表格。 我想让该产品免费提供给所有人。 如果有一百万人决定使用它,那么为他们服务的成本应该很少。

To make this happen I decided to use Google Drive to store the users data. It’s proven secure, dependable and is compliant with all the things people may need. Also it’s nice knowing your data is somewhere familiar. Google Drive gives everyone 15GB free of storage so is a great way to make more use of it. I wanted to ensure a very high level of security. To achieve this I designed it such that your data only flows between Google Drive and your browser. And encrypted at all times. This makes it way more secure and I don’t have to worry about storing any sensitive user information.

为此,我决定使用Google云端硬盘存储用户数据。 它被证明是安全,可靠的,并且符合人们可能需要的所有东西。 知道您的数据很熟悉也很高兴。 Google云端硬盘为每个人提供15GB的免费存储空间,因此是充分利用它的好方法。 我想确保很高的安全性。 为此,我对其进行了设计,以使您的数据仅在Google云端硬盘和浏览器之间流动。 并始终加密。 这样可以使其更加安全,而且我不必担心存储任何敏感的用户信息。

To host the application I choose Google Firebase Hosting. A pretty great product that uses Google’s CDN networks to serve the app to anyone in the world in the fastest way possible. I love that it takes one command “firebase deploy” to launch a new version of in seconds. There is very little else I had to do.

要托管该应用程序,请选择Google Firebase托管。 一款很棒的产品,它利用Google的CDN网络以最快的方式向世界上任何人提供该应用程序。 我喜欢它只需一个命令“ firebase deploy”即可在几秒钟内启动新版本的 。 我只需要做很少的事情。

As soon as the app started gaining users, I began getting feature requests. One of the more popular requests was for a way to share the file with others or embed it on their own website. This feature required me to handle some backend computation. In a traditional way, this would have required me to run a server but in this case I used Cloud Functions. This is a true Serverless infrastructure and is well integrated into Firebase. Cloud Functions allows for small snippets of code to execute. This trigger can be any event like request from browser. And you’re only charged tiny fractions of a cent for each run. This works out to about 40 cents for a million runs. It’s important to remember there are no servers for you to manage here not even virtual ones.

该应用开始吸引用户后,便开始收到功能请求。 最受欢迎的请求之一是与他人共享文件或将其嵌入自己的网站中的方法。 此功能要求我处理一些后端计算。 以传统方式,这将需要我运行服务器,但在这种情况下,我使用了Cloud Functions。 这是真正的无服务器基础架构,并且已很好地集成到Firebase中。 云功能允许执行少量代码段。 此触发器可以是任何事件,例如来自浏览器的请求。 而且每次运行只收取一分钱的一小部分。 一百万次运行大约要花40美分。 重要的是要记住,这里没有服务器供您管理,甚至没有虚拟服务器。

Anyone building software is familiar with the process of breaking down a larger problem into small parts. With Cloud Functions each part only runs when it triggered and you only pay when it does. I’d like to think that Serverless will help us use our computing resources in a more efficient way. And we will need less servers than we would have. With tech taking over everything, needing less servers should be good for the environment in the long run. Thinking serverless helps us build better products with smaller teams. Snapchat which runs on Google App Engine. They have spoken about how they don’t have anyone managing servers within their team. This is very unusual for products at their scale.

任何构建软件的人都熟悉将大问题分解为小部分的过程。 使用Cloud Functions,每个部件仅在被触发时才运行,而您只有在触发时才付费。 我想认为Serverless将帮助我们以更有效的方式使用我们的计算资源。 而且我们将需要比以前更少的服务器。 从长远来看,随着技术接管一切,需要更少的服务器应该对环境有利。 认为无服务器可帮助我们与较小的团队一起开发更好的产品。 在Google App Engine上运行的Snapchat。 他们谈到了如何在团队中没有人管理服务器。 对于大规模产品而言,这是非常不寻常的。

“If I have seen further it is only by standing on the shoulders of giants.”

“如果我看得更远,那只能站在巨人的肩膀上。”

Making good tech choices can help your idea in so many ways. Like in the case of it’s allowed me to keep the product free and accessible to anyone who needs it. It also allowed a single developer to continue to focus on the core product and be very productive. Going Serverless on the Google Cloud gives so much for free. Planets fastest networks a very high level of security, sophisticated computing infrastructure managed by lots of very smart people. And for me the most important benefit of all that as I end this article and go to bed, someone else will be making sure my code keeps running.

做出好的技术选择可以在很多方面帮助您的想法。 就像一样,它使我可以免费使用该产品,任何需要它的人都可以使用。 它还使单个开发人员可以继续专注于核心产品并提高生产力。 在Google Cloud上实现无服务器化可免费为很多服务。 Planets最快的网络具有很高的安全性,并由许多非常聪明的人管理着复杂的计算基础架构。 对我来说,最重要的好处是,当我结束本文并上床睡觉时,其他人将确保我的代码继续运行。

翻译自:

超微服务器主板启动无反应

转载地址:http://zbzzd.baihongyu.com/

你可能感兴趣的文章
设计模式六大原则
查看>>
android中的数据库操作
查看>>
当用updatepanel和scriptmanager时,弹出框
查看>>
如何破解百度云大文件下载限制
查看>>
冒泡排序
查看>>
react中<link>和<navlink>区别
查看>>
C# 生成随机数
查看>>
Psutil模块的应用
查看>>
session概述
查看>>
MATLAB 单变量函数一阶及N阶求导
查看>>
如何在网页端启动WinForm 程序
查看>>
[转载] Java并发编程:Lock
查看>>
MySQL之索引
查看>>
JAVA设计模式之单例模式
查看>>
优秀博客
查看>>
词法分析程序
查看>>
Java反射
查看>>
[ACM_模拟][ACM_数学] LA 2995 Image Is Everything [由6个视图计算立方体最大体积]
查看>>
1040 有几个PAT
查看>>
BZOJ 1412 [ZJOI2009]狼和羊的故事 | 网络流
查看>>