Live data from Hacker News

Leaving serverless led to performance improvement and a simplified architecture

unkey.com

181–190 of 272 posts

Re: Leaving serverless led to performance improvement and a simplified architecture

#181
post #87

As someone who worked with serverless for multiple years (mostly amazon lambda but others too) i can absolutely apporove the authors points. While it "takes away" some work from you, it adds this work on other points to solve the "artificial induced problems". Another example i hit was a hard upload limit. Ported an application to a serverless variant, had an import API for huge customer exports. Shouldnt be a proble…

The way to work around this issue is to provide a presigned S3 url Have the users upload to s3 directly and then they can either POST you what they uploaded or you can find some other means of correlating the input (eg: files in s3 are prefixed with the request id or something) I agree this is annoying and maybe I’ve been in AWS ecosystem for too long. However having an API that accepts an unbounded amount of data is…

this kinda proves the point that you have to know a silly workaround

Re: Leaving serverless led to performance improvement and a simplified architecture

#182

Earlier quoted context omitted.

> Uploads to an S3 bucket can trigger a lambda… don’t complicate things. I read this and was getting ready to angrily start beating my keyboard. The best satire is hard to detect.

I don't really get the joke. S3 triggering a lambda doesn't sound meaningfully more complicated than using a lambda by itself. What am I missing?

It gets really complex in this workflow to even achieve something like “file coprocessor successfully” on the client side with this approach

how will your client know if you backend lambda crashed or whatever? All it knows is the upload to s3 succeeded

Basically you’re turning a synchronous process into asynchronous

Re: Leaving serverless led to performance improvement and a simplified architecture

#183
This really is confirming my theory that the problem here is that "serverless" is so ill-defined that even it's own name is nonsensical.

Like, there are still servers.

Appears just about as intelligent as calling them "electricity-less." I mean, yes, I no longer think about electricity when deploying things, but that doesn't tell me anything meaningful about what's going on here.

Re: Leaving serverless led to performance improvement and a simplified architecture

#184
da rulez:

- if you don't understand your concept/market, build in a VPS. you can get away with scaling a VPS for a while.

- if you intend to be netflix, rent at the edge (mid game) and eventually own the edge servers in POPs (otherwise, "edge" compute isn't worth it). before that, start with a beefy VPS cluster with HA and SQLproxy.

- if you spin to zero, use lambdas (for things like codebuild or fractional needs of a computer). before that, build things in VPSes.

- if you spin up/down but not to zero, use container platforms?

- once you have a reliably steady understanding of your infrastructure, buy physical servers in a colo

Re: Leaving serverless led to performance improvement and a simplified architecture

#185

Earlier quoted context omitted.

> Working in the cloud forces you to address the hard problems first. It also forces you to address all the non-existent problems first, the ones you just wish you had like all the larger companies that genuinely have to deal with thousands of file upload per second. And don't forget all the new infrastructure you added to do the job of just receiving the file in your app server and putting it into the place it was g…

> the ones you just wish you had You will have these problems. Not as often as the larger companies but to imagine that they simply don't exist is the opposite of sound engineering. > if they never got called in the first place due to misconfiguration Centralized logging is built into all these platforms. Debugging these issues is one of the things that becomes absurdly easy. > likely locked into your upload system T…

> You will have these problems. Not as often as the larger companies but to imagine that they simply don't exist is the opposite of sound engineering.

A lot of those failure mode examples seem well suited to client-side retries and appropriate rate limiting. If we're talking file uploads then sure, there absolutely are going to be cases where the benefits of having clients go to the third-party is more beneficial than costly (high variance in allowed upload size would be one to consider), but for simple upload cases I'm not so convinced that high-level client retries aren't something that would work.

> if they never got called in the first place due to misconfiguration

I find it hard to believe that having more components to monitor will ever be simpler than fewer. If we're being specific about vendors, the AWS console is IMHO the absolute worst place to go for a good centralized logging experience, so you almost certainly end up shipping your logs into a better centralized logging system that has more useful monitoring and visualisation features than CloudWatch and has the added benefit of not being the AWS console. The cost here? Financial, time, and complexity/moving parts for moving data from one to the other. Oh and don't forget to keep monitoring on the log shipping component too, that can also fail (and needs updates).

> The protocol provided by S3 is available through dozens of vendors.

It's become a de facto standard for sure, and is helpful for other vendors to re-implement it but at varying levels of compatibility.

> It only matters if it is of equivalent or lessor cost.

This is precisely the point, I'm saying that adding boxes in the system diagram is a guaranteed cost as much as a potential benefit.

> Yet you explicitly ignore these

I repeatedly mentioned things that to me count as complexity that should be considered. Additional moving parts/independent components, the associated monitoring required, repository sprawl, etc.

> No, I just read the documentation, and then built it.

I also just 'read the documention and built it', but other comments in the thread allude to vendor-specific training pushing for not only vendor-specific solutions (no surprise) but also the use of vendor-specific technology that maybe wasn't necessary for a reliable system. Why use a simple pull-based API with open standards when you can tie everything up in the world of proprietary vendor solutions that have their own common API?

Re: Leaving serverless led to performance improvement and a simplified architecture

#186
If it’s got to be serverless then use a PaaS that is docker based as input format. That at least gives some level of platform portability if you need to shift it later

But yeah in this case 10ms requirement doesn’t leave a lot of room for elaborate anything

Re: Leaving serverless led to performance improvement and a simplified architecture

#187
I would love to know the net result to their financials for this move. I have no doubt they were able to improve their performance. I'm just wondering if the juice was worth the squeeze, especially if they could have been building other features that customers would want. I didn't read anything about the opportunity cost in the article or even the consideration.

Re: Leaving serverless led to performance improvement and a simplified architecture

#188
post #43
post #31

Earlier quoted context omitted.

The takeaway isn't that they didn't understand, it's that they are sharing information which you agree is valuable

What's valuable about rediscovering that stateless architectures requiring network round-trips for state access are slower than in-memory state? This isn't new information, it's a predictable consequence of their architecture choice that anyone with distributed systems experience could have told them on day zero.

Uh, no, 95% of our architectures are stateless and its fine because RTT isn't dogshit, unlike AWS lambda.

Re: Leaving serverless led to performance improvement and a simplified architecture

#189

I think the "local maximum" we've gotten stuck at for application hosting is having a docker container as the canonical environment/deliverable, and injecting secrets when needed. That makes it easy to run and test locally, but still provides most of the benefits I think (infrastructure-as-code setups, reproducibility, etc). Serverless goes a little too far for most applications (in my opinion), but I have to admit s…

Docker is much like microservices. Appropriate for a subset of apps and yet touted as being 'the norm' when it shouldn't be. There are drawbacks to using docker, such as security patching and operational overhead. And if you're blindly putting it into every project, how are you mitigating the risks it introduces? Worse, the big reason it was useful, managing dependency hell, has largely been solved by making develope…

The dirty secret of Docker is almost every docker container deployed is actually a VM, not just a container.

Re: Leaving serverless led to performance improvement and a simplified architecture

#190

Earlier quoted context omitted.

Solving a serverless limitation with more serverless so you can continue doing serverless when you can’t FormUpload a simple 101mb zip file as an application/octet-stream. Doubling down on it for a triple beat.

I wouldn't really call it "more" severless to rearrange the order a bit. Which makes it "solving a serverless limitation so you can continue doing severless". And that's just a deliberately awkward way of saying "solving a serverless limitation" because if you can solve it easily why would you not continue? Spite? So I still don't see how it's notably worse than the idea of using serverless at all.

The controversy here is the fact that the API Gateway limits the upload resulting in having to engineer a workaround workflow using s3 and triggers (even if this is the serverless way) when all you want to do is upload a file. A POST call with an octet-octet stream. Let http handle resume. But you can’t and you end up going around the side door, when all you really want is client_body_max_size

The sarcasm of correctness yet playing down its complexity is entirely my own. We used to be able to do things easily.

Post reply on HN