Live data from Hacker News

Guide to Serverless Architecture

simform.com

71–80 of 105 posts

Re: Guide to Serverless Architecture

#71
post #63

For me the BIGGEST gain of using serverless architecture is security. For example, this year I started two ecommerce platforms. One's a digital delivery e-shop - selling ebooks, training and stuff and the other is a physical delivery e-shop. Normally, I'd write my own Phoenix/Rails app, but this time, I decided to go serverless for my furniture shop and wrote it all in Jekyll. Yes, the static site builder. I use netl…

> That's when it hit me hard that my customers needn't care nor know what's behind their favorite site.

It's true! They don't care in the least, as long as it works and lets them do the thing they came there to do.

Re: Guide to Serverless Architecture

#72
post #62

Earlier quoted context omitted.

I get this from your site: Security risk detected: Trojan.Gen.NPE

Thanks! I presume it's the Coinhive script that triggers it. What antivirus software do you use?

symantec endpoint protection ... ? (I'm at work)

Re: Guide to Serverless Architecture

#73
post #10

> grouping a bundle of functions together behind an API gateway, you’ve created a microservice Always beats me why people don't warn the readers about the almost impossible nature of logging and monitoring such systems :/

How is it impossible? My team and I have built and maintain quite a large serverless system--logging and monitoring have been the easy parts.

Re: Guide to Serverless Architecture

#74
I've built and maintain quite a large serverless system, with a large team of people, and most of these issues aren't really a big deal. Cold start is well-known and also has well-known mitigations (e.g. don't use the JVM, which wasn't designed for fast startup times).

I use AWS extensively, so I can elaborate on AWS's approach to these problems. Deployment is straightforward with CloudFormation, VPCs/security groups/KMS/etc. provide well-documented security features, CloudWatch provides out-of-the-box logging and monitoring. Integration testing is definitely important, but becomes a breeze if your whole stack is modeled in CloudFormation (just deploy a testing stack...). CloudFormation also makes regionalization much easier.

The most painful part has been scaling up the complexity of the system while maintaining fault tolerance. At some point you start running into more transient failures, and recovering from them gracefully can be difficult if you haven't designed your system for them from the beginning. This means everything should be idempotent and retryable--which is surprisingly hard to get right. And there isn't an easy formula to apply here--it requires a clear understanding of the business logic and what "graceful recovery" means for your customers.

Lambda executions occasionally fail and need to retry, occasionally you'll get duplicate SQS messages, eventual consistency can create hard-to-find race conditions, edge cases in your code path can inadvertently create tight loops which can spin out of control and cost you serious $$$, whales can create lots of headaches that affect availability for other customers (hot partitions, throttling by upstream dependencies, etc.). These are the real time-consuming problems with serverless architectures. Most of the "problems" in this article are relatively easy to overcome, and non-coincidentally, are easy to understand and sell solutions for.

Re: Guide to Serverless Architecture

#75
post #56
post #46

Earlier quoted context omitted.

> - Vendor lock-in Try something like https://github.com/apex/up - write the code as regular servers, and it'll convert your entire server into a function. > - Cold/warm start Should be a temporary annoyance - I'm sure all the providers are already hard at work on fixing this. > - Security/monitoring Easier to do than regular servers - most FaaS systems have monitoring built in, and collect whatever you write to STDO…

I didn't really feel like the benefits of packages like Serverless and Apex were worth it for me, as they're not solving that big of a problem, and you'd replace it with lock-in to even less mature products. That said, the current lock-in is not that bad, just good to be aware of and keep an eye on. I hope that the annoyances are temporary indeed, but that doesn't buy me anything today :) That said, I think for almos…

Up != Apex, same developer, though. Apex embraces serverless as an architecture, Up runs regular servers as functions.

Re: Guide to Serverless Architecture

#76
post #10

> grouping a bundle of functions together behind an API gateway, you’ve created a microservice Always beats me why people don't warn the readers about the almost impossible nature of logging and monitoring such systems :/

Do you mind expanding on that?

With APIG+Lambda you get CloudWatch integration 'out-of-the-box', and can expand the metrics and logs you send out with a few added lines of config.

You can also toggle X-Ray for a detailed view of your call graph.

If the default implementation isn't good enough, you can define your own CW events, alarms, and log filtering.

I'll grant you that you can't just ssh into a host and tail some logs, but if you're keen you can send your logs to elasticsearch for a better arbitrary search experience.

Re: Guide to Serverless Architecture

#78
post #38
post #17

Drawbacks I experience: - Vendor lock-in: although I try to minimise this and have a clear picture of where the lock-in lies, it is very much present. - Cold/warm start: this is somewhat annoying. I haven't set up keepalive requests yet, but they feel like an ugly hack, so I'm not sure if I'm going to or if I will just suck it up. - Security/monitoring: having fewer functions make this less of a worry, but it's still…

> - Vendor lock-in: although I try to minimise this and have a clear picture of where the lock-in lies, it is very much present. The post isn't loading so I don't know exactly what it's in reference to (AWS lambda, the framework, the more generic idea?). But, the serverless framework[0] supports all major cloud providers (AWS, Google, & Azure) as well as self-hostable options like OpenWhisk and Kubeless. [0] https://…

I may be naive (or just witless), but don’t you kind of end up with vendor lock-in to serverless itself?

The first step in their example is “login to your serverless account”.

Re: Guide to Serverless Architecture

#79
post #5

Earlier quoted context omitted.

More like CGI scripts with a loadbalancer that promises to run your application on a host with enough memory within at most 600ms. That solves an actual problem with CGI scripts, but I really would love to see more tiers with lower latency brackets, sub 10 milisecond should be doable for certain lambdas and costs.

sub 10 ms would only work if they had an instance running and warm, ready to take requests - if they still have to look up your function, provision a machine, interpret it etc it's easy to go past that. 600ms is still respectable if it's from a "cold start". But if you've got time critical applications maybe serverless is not for you.

I don't see why this is necessarily the case. You can boot lightweight VMs with a unikernel in under 10ms [1].

[1] http://cnp.neclab.eu/projects/lightvm/lightvm.pdf

Re: Guide to Serverless Architecture

#80
post #38

Earlier quoted context omitted.

> - Vendor lock-in: although I try to minimise this and have a clear picture of where the lock-in lies, it is very much present. The post isn't loading so I don't know exactly what it's in reference to (AWS lambda, the framework, the more generic idea?). But, the serverless framework[0] supports all major cloud providers (AWS, Google, & Azure) as well as self-hostable options like OpenWhisk and Kubeless. [0] https://…

I may be naive (or just witless), but don’t you kind of end up with vendor lock-in to serverless itself? The first step in their example is “login to your serverless account”.

My most recent serverless configuration file was probably approximately 90 percent aws specific (cloudformation) syntax anyways.
Post reply on HN