30K page views for $0.21: A Serverless story

30K page views for $0.21: A Serverless story

https://fmlnerd.com/2016/08/16/30k-page-views-for-0-21-a-serverless-story/


Related discussions:

Really cool use case. Of all the features being released in AWS “serverless” is the most exciting for me. I’m a 15 year Systems Engineer and I’m tired of managing infrastructure. When projects like this showcase the benefits of “serverless” I get motivated again.

Thanks for the link.

Ha ha, same link is getting reamed over at /r/programming mirroring the emerging controversy whether serverless means, duh, serverless.

Lambda is a great concept, but the language support needs looking at. Via shims we can make code in any language, but it feels hacky. Most sites are not prepared to code business functionality in node, the Java runtime is expensive (you really need a 512Mb config to do anything even simple), and Python is great for some things, but awful for many others.

Support for Go would run a circle around its creator Google (the GCP equivalent to Lambda - Functions - is still in alpha, and is node only), support for Ruby would get a ton of traction from a lot of devs who are looking for something fresher than Rails, and so on.

I’m keeping my eye on serverless, apex and others, but right now the flexibility and maturity of tooling in the container space with Docker means that’s my first thought for new projects, still.

That argument is so stupid. Fine we’ll call it “managed services” to appease the contrarians. The fact remains, although I can manage my own servers, I can also off load that management to a company. A company that only charges me only for usage. This is same argument that came up years ago with owned Datacenters and Co-lo’s. I don’t know why there’s so much hate. Maybe I’m older and bitter about being a grey beard? And I’ll accept help instead of building everything over and over again.

I’ll agree that language support needs work. Hell Python 2 vs 3 is still a major complaint among us that use Boto. But I don’t see docker as an abstraction that makes my job easier. It just moves the management layer up a level yet the same management is needed. I now need to manage the instances that run those containers, or even with ECS, I have to manage the cluster. Lambda allows me to just manage the running resources. It’s not the end all be all of solutions, but for simple rest apps it’s getting a lot better.

W.r.t your S3 → Lambda fan out problem. S3 supports SNS as an event destination which supports Lambda subscriptions. It feels like something of a kludge, but it does solve the problem of parallel invocations from a single S3 Notification.

Serverless and containers are cool, but what’s really needed is the magic tool that breaks up monoliths into something more manageable/maintainable.

You know, the whole microservices goal. Can’t help but think it’s gated by calcified, mostly untouchable databases. Even Martin Fowler’s Strangler pattern can choke on unraveling a legacy database with stored procedures.

Nice, my devops team has been pushing for this, and used gordon for deploying, which apparently does tons of heavy lifting for you.

It’s not the servers that disappear, but the elasticity and provisioning management, and the deployment. Much of the operations lifecycle gets streamlined and handled via configuration or API. I spent a bit of time with lambda and API Gateway, but haven’t got good enough answers yet on how far it scales, and how quickly it can scale up in the face of traffic. An AWS Loft speaker talked about using it for a Superbowl ad, so that’s pretty big, but I have yet to try that myself.

By day I’m working on a Rails monolith we want to break up into micro services (different languages).

The challenge is not the data store, it’s identifying the potential data stores. Most monoliths have never had any adequate domain design go into them, so there is no separation of concern, and it’s very chatty inside there with code being able to talk directly to another bit of code without having to go through a clean interface. Especially in Rails - law of demeter is frequently broken.

For us, Lambda is attractive because we have some functions that are very, very spiky in their load. So it makes sense to say “split that out into its own domain” - which we would normally do with a micro-service, deploy it using Docker, say - but then to take it a step further and say “can we use Lambda here?”.

That last step is still tricky when orchestrating with other pieces. You won’t ever get to a point where you can stop working on the monolith and get to rebuild the entire thing in serverless, so you need to figure out your piece-by-piece method for doing it.

We’re using Docker for an architecture with about 30 micro-services, and 100 or so background jobs. It’s much, much, much simpler than trying to do it in a non-containerised way.

Serverless is where we’d love to get to, but the tooling is still too young and configuration management is not quite there yet to make it simple to start breaking up some of this stuff.

I’ve heard rumors that AWS is planning to support .NET Core in Lambda. That would be a great alternative, as Core is surprisingly fast and thin for a Microsoft product.

Where do you keep your data if not in a monolithic RDS instance? DynamoDB?

Is there such a thing as micro-storage to go with micro services? Something to encapsulate and scale together?

gordon and those kind of tools are a devops dream. cuts out a ton of maintenance time.

I always figured .NET had basically the same issues here that Java would in terms of resident memory consumption. I know there’s several respects where .NET is basically “Java done better”, but is this also one of them?

Thanks for the referral to Gordon - tool to create, wire and deploy AWS Lambdas using CloudFormation. Didn’t know about it, though the project link was posted a couple of months ago..

There’s always going to be a data store.

We do RDS, and we also have Elasticsearch which we’re using not just for search, but in many cases a JSON store for view rendering (way, way faster than any SQL solution).

I think I’ll be trying to convince the team to stand up a Cassandra cluster soon.

I want to believe this rumour is true.