Live data from Hacker News

Chalice: Python Serverless Microframework for AWS

aws.amazon.com

81–90 of 101 posts

Re: Chalice: Python Serverless Microframework for AWS

#81
post #2

Ok, I have seen the phrase "serverless" a few times recently. Can someone explain to me what it is (as I am pretty sure it involves a server - it runs on AWS ffs) and why I should want to use it? And most importantly, is it web scale?

Well, if you look at how we've done things over the years: - We used to have our own machines in our own data centers - Then we started renting machines in data centers - We then moved to the cloud model where we would get compute capacity on demand. But the minimum unit was an hour - But what if you could deploy your code and you were only charged for the compute and memory you take for the fulfillment of that reque…

then why is it something new? Isn't this what google appengine / heroku has been doing for years ?

Re: Chalice: Python Serverless Microframework for AWS

#82

Earlier quoted context omitted.

Well, if you look at how we've done things over the years: - We used to have our own machines in our own data centers - Then we started renting machines in data centers - We then moved to the cloud model where we would get compute capacity on demand. But the minimum unit was an hour - But what if you could deploy your code and you were only charged for the compute and memory you take for the fulfillment of that reque…

then why is it something new? Isn't this what google appengine / heroku has been doing for years ?

probably, but when I look at examples of companies using lambda, it seems rather generic.

Re: Chalice: Python Serverless Microframework for AWS

#83
post #75

Earlier quoted context omitted.

I don't have a strong opinion one way or the other, but I'd like to point out that micro instances also have diminished networking (besides processing/memory). Depending on what you're doing, this could be a factor.

We can afford a t2.medium or an m3.medium at the price he quoted, which will have better RAM, processing capability, and probably equivalent networking capability, so that isn't really the takeaway point.

The point is, his lambda setup has vastly better capability than your instance, should he need it. Unless you're able to bring instances up fast enough to address your need, which clearly doesn't put you in the same ballpark as him.

Re: Chalice: Python Serverless Microframework for AWS

#84

Earlier quoted context omitted.

I'm also guessing there's no session state or cookies?

We'll I guess there wouldn't be without a server. You'd have to use JWT or the like.

the functions are stateless, but you can access S3 and DynamoDB.

Re: Chalice: Python Serverless Microframework for AWS

#85

Earlier quoted context omitted.

Well, if you look at how we've done things over the years: - We used to have our own machines in our own data centers - Then we started renting machines in data centers - We then moved to the cloud model where we would get compute capacity on demand. But the minimum unit was an hour - But what if you could deploy your code and you were only charged for the compute and memory you take for the fulfillment of that reque…

then why is it something new? Isn't this what google appengine / heroku has been doing for years ?

GAE will start up a machine occasionally to deal with increased demand and keep them on for 15 minutes at least. With something like Lambda (my old favourite was PiCloud) I can scale out to 50 processes for 10 seconds and only pay for 500 seconds of processing time.

For me, most of the benefit comes from data processing, where my usage is very bursty. The classic example used on most of the tutorials is image thumbnails/scaling/similar. All you want to say is "Do X to every file in this folder of 50k images" and let someone else handle starting and stopping as many machines as they can in order to get this done as quickly as possible.

Re: Chalice: Python Serverless Microframework for AWS

#86
post #72

Earlier quoted context omitted.

I've found Lambda to be really ridiculously fucking cheap. We moved image resizing onto it and saved thousands a month. Don't compare the cost of Lambda per 100ms to the cost of a virtual machine per month since Lambda only charges as you use it. You'd have to have the CPU pegged at 100% usage to make that a fair comparison. Mind you even if you took the cost of Lambda per 100ms and multiplied that out for a monthly…

I would say that it strongly depends on the type of requests you are handling. Saying that you can run a 1GB lambda for 1 month nonstop for $32 does not impress me, and its kind of strange that it impresses you. You could run a t2.micro with the same RAM for $6/mo if you reserve it for a year. And if you want to give that t2.micro a workload where it only has to respond to 1 request at a time, the same terms we are a…

You can't compare it to a t2.micro because that's not what you're getting with lambda. t2.micro is a single, weak piece of hardware meant to handle 30 requests per second? I forsee issues there. For the same traffic would be called in parallel when the spikes require it, which is something you would not get without scaling the t2 micro and programming concurrency. And that is ultimately where the comparison comes in. Because hardware needs to be able to accommodate unpredictable traffic, it is running all the time, and it is beefier than it needs to be. The performance buffer to account for unpredictable traffic is completely eradicated when using FaaS.

I still use dedicated hardware where I deem it appropriate, but the proof is in the pudding. For the right services, pulling them out into lambdas is proving to be a huge savings and performance boost for countless architectures.

Re: Chalice: Python Serverless Microframework for AWS

#87
post #33
post #2

Ok, I have seen the phrase "serverless" a few times recently. Can someone explain to me what it is (as I am pretty sure it involves a server - it runs on AWS ffs) and why I should want to use it? And most importantly, is it web scale?

It means that you no longer have to deal with the server configuration - the servers are completely hidden from you. You just give your functions to AWS, and they run them in a black-magic-box of theirs. I've tested it at least to the extent of 100-200 rq/sec, and it holds up nice. Ultimately, there is a server somewhere, as you might expect. It's just not yours to manage/worry about.

[deleted]

Re: Chalice: Python Serverless Microframework for AWS

#88
post #18
post #12

Earlier quoted context omitted.

"Let it be known that Lambda only supports python 2.7, not python 3, and that really frickin sucks. Get your shit together, Amazon." Node 4 support came, what, a month ago? It's pretty ridiculous.

There is no significant benefit to python 3 over python 2.

Asyncio?

https://docs.python.org/3/library/asyncio.html

Re: Chalice: Python Serverless Microframework for AWS

#89
post #2

Ok, I have seen the phrase "serverless" a few times recently. Can someone explain to me what it is (as I am pretty sure it involves a server - it runs on AWS ffs) and why I should want to use it? And most importantly, is it web scale?

Well, if you look at how we've done things over the years: - We used to have our own machines in our own data centers - Then we started renting machines in data centers - We then moved to the cloud model where we would get compute capacity on demand. But the minimum unit was an hour - But what if you could deploy your code and you were only charged for the compute and memory you take for the fulfillment of that reque…

That's not really how things were.

We used to have "web hotels". Then they grew server side programming support, such as Perl and later PHP. Customers were at first not separated at all but later they were with Virtuozzo and similar systems.

This was later rebranded PaaS, to differentiate from cheap PHP hosting of yore. Some has now rebranded to serverless. It's not so much a "direction" as it is market differentiation.

Re: Chalice: Python Serverless Microframework for AWS

#90
post #2

Ok, I have seen the phrase "serverless" a few times recently. Can someone explain to me what it is (as I am pretty sure it involves a server - it runs on AWS ffs) and why I should want to use it? And most importantly, is it web scale?

It's just marketing hype. As you noted there is no such thing as serverless. It is another architecture that forces you to use AWS Lambda and API gateway and a few other services to glue everything together. The idea being that if you are just shuttling bytes back and forth then the overhead of the traditional deployment is too much and you're better served with what looks like an event bus with some transformers sit…

It seems like its a serverless pricing model.
Post reply on HN