Live data from Hacker News

Going Serverless with AWS Lambda and API Gateway

blog.ryankelly.us

11–20 of 55 posts

Re: Going Serverless with AWS Lambda and API Gateway

#11
In case someone is looking to move their java REST server to Lambda, here are a few lessons I learnt: a) fragment your REST war into smaller micro services wars. The load time for big REST application will impact your caller. Small micro services will boot up on Lambda much faster and respond quicker. b) If you use spring dependency injection, you may want to rethink that and tweak/optimize it. I had a database tier with over 20 hibernate/ebj beans . The load time was horrendous. I had to eliminate all beans not needed by the microservice.

Re: Going Serverless with AWS Lambda and API Gateway

#13
post #2

Are serverless and container based architectures really that popular in the real world, or is it yet another HN bubble? I'm still happy using virtual/cloud servers for anything/everything.

I'm sure as a percentage of deployed products or services that a full serverless architecture is miniscule. What I have seen in production are systems made better by use of certain AWS/Lambda integrations.

One crisp example of this is with S3 storage of images. When each new image it pushed into S3, S3 kicks off a Lambda function which resizes the image into thumbnails. This S3+Lambda system replaced a much more involved image processing pipeline with EC2, queues, a data store, etc. The end result was a system much easier to manage, support and reason about.

Re: Going Serverless with AWS Lambda and API Gateway

#14
post #9
post #6

aka "Going towards total vendor lock in by basing your system on a proprietary, non portable infrastructure service"

FWIW, OpenWhisk, while available on IBM Bluemix, is also open source and can be run wherever you so desire: https://github.com/openwhisk/openwhisk

If you want to run it in aws you will still have to run it on a server.

BTW: I really hate the marketing inventions. There's no cloud, or serverless, you still run your software on someone's server.

Re: Going Serverless with AWS Lambda and API Gateway

#16
post #6

aka "Going towards total vendor lock in by basing your system on a proprietary, non portable infrastructure service"

Not if you build things in a thoughtful way. The code behind a REST call shouldn't really be all that different when deployed to Lambda vs run in a standalone binary on a rackspace server.

Re: Going Serverless with AWS Lambda and API Gateway

#18
post #14
post #9

Earlier quoted context omitted.

FWIW, OpenWhisk, while available on IBM Bluemix, is also open source and can be run wherever you so desire: https://github.com/openwhisk/openwhisk

If you want to run it in aws you will still have to run it on a server. BTW: I really hate the marketing inventions. There's no cloud, or serverless, you still run your software on someone's server.

I hear ya. The keyless entry on my Prius still requires me to carry a key.

Re: Going Serverless with AWS Lambda and API Gateway

#19
post #2

Are serverless and container based architectures really that popular in the real world, or is it yet another HN bubble? I'm still happy using virtual/cloud servers for anything/everything.

Won't setting up good auto-scaling and deployment procedures result in something just like Lambda, but you had to orchestrate it yourself?

It seems like there's a lot to be said for the cost and time savings of having it done for you...

Re: Going Serverless with AWS Lambda and API Gateway

#20
post #2

Are serverless and container based architectures really that popular in the real world, or is it yet another HN bubble? I'm still happy using virtual/cloud servers for anything/everything.

Here are my opinions from working with both over the last year:

Serverless is brand new, and has all the burrs of a freshly cut service. Expect sharp corners, like bizarre documentation and lack of examples. I think it goes without saying that tooling and Best Practices are still immature. In my work (Lambdas) I've found they do well when organizing small pieces of work and event driven systems. They really do talk with all of AWS and event triggers are popping up all over their infrastructure.

For me, Serverless is more about "not writing server boilerplate/provisioning" than "not having servers". The largest hurdle conceptually has been hoisting tangential concerns from the application into the infrastructure primitives. Here are some examples in my current work:

* The API Gateway does routing, some payload modification for headers, as well as authentication and authorization.

* I'm also relying more on security groups and specialized IAM roles instead of application specific authorization code. This leaves me with only the application specific code to be called.

* Lambdas communicate with each other through SNS (and only when authorized via IAM).

* All of my application code (currently) exists as Lambdas.

This comes at a cost of infrastructure complexity and a learning curve. I'm also not using several services that AWS provides just to keep my cognitive load from exploding.

Serverless Overall: Like exploring the jungles of Africa! Lots of really cool ideas and deployments, but here be lions!

Containers are on the march of maturation. For me, the most useful part of Docker is decoupling the local application needs with the deployment environment. I exploit that decoupling to make sterile local development environments with Docker/Compose. The recent Docker OSX/Windows support smooths out the last few bumps in my dev workflow.

The deployment, however, is still maturing. To be fair, it's mostly a distributed computation problem and not unique to Docker. Kubernetes is a bear, but an improving one. Same with E2C from what I've heard from friends. On a smaller scale, it significantly opens up the playing field for less popular languages/tools. Heroku's Docker support, for example, allows for any language to be deployed as long as it accepts the Docker contract.

Docker Overall: a) Local is AWESOME! b) Deployment is the Wild West. Still largely unsettled but the Oregon Trail is OPEN!

Post reply on HN