Live data from Hacker News

Serverless Architectures

martinfowler.com

91–100 of 149 posts

Re: Serverless Architectures

#91

http://martinfowler.com/articles/serverless/sps.svg Is there something wrong that the client browser is connecting directly to the database, so JS -> MySQL direct connection won't expose credentials ?

It doesn't say "MySQL database". The client could conceivably connect to something like an ElasticSearch database (JSON API), setup with no auth/read-only permissions and appropriate rate-limiting.

You are really talking about a very small use case if you say the only database that could be used would be no auth/read-only considering most database requires auth for security and most apps need to write.

Re: Serverless Architectures

#92
post #90
post #88

Earlier quoted context omitted.

I've been using Elastic Beanstalk lately and it's a true pleasure.

Curious about your use of beanstalk: I'm considering using beanstalk for a php app but we have content changes that are very frequent. 134 domains (virtual hosts) and maybe 500 pages (the html) change a day. How do you update the load balanced set of instances when the instances count changes? tks

Beanstalk handles the load balancing for you and throws a DNS entry in front of it all, as far as I can tell. Works well so far. It's smart and (seems to do) blue/green style deploys for my single app instance atm I believe.

(I'm only running on a single box so far, mostly using it because it made deploying to production and all the annoyances that come with that a breeze).

Re: Serverless Architectures

#93
post #26
post #14

Serverless = new name for PaaS. VPS (virtual private servers) were available (and largely ignored) for quite a while before 2006, when AWS came along with the catchy word "cloud". This single word changed everything. Same technology all of the sudden became cool, and everybody started using it. Maybe now it is the turn of PaaS [1] - call it "serverless" and folks finally start seeing all the benefits (true scalabilit…

Since serverless is a kind of a PaaS, it offers many of the same benefits. However, unlike Heroku, Cloud Foundry, OpenShift, and other traditional PaaSes focused on supporting long running applications and services, serverless frameworks offer a new kind of a platform for running short lived processes and functions, also called microflows. The distinction between the long running processes and microflows is subtle bu…

Diego, the underlying scheduler for Cloud Foundry, has a concept of pre-defined one-off tasks. It'll eventually show up in the rest of the platform.

However, it'll be in the middle of the range for startup times, as some agents are sideloaded. Latency is around a second. The initial target is tasks like database migrations and batch jobs, so the ~1s delay isn't an issue.

One of my colleagues in NYC spiked on using one-off tasks for a FaaS and concluded it's not a slam dunk fit.

If I was to shimmy FaaS-style stuff into Cloud Foundry, I think it'd be easier to have standing apps with an array of functions already running, then push the magic into route services. I suspect this is how AWS already does it, given the vast difference in spinup times between Node and JVM requests -- Node makes hot-patching a list of functions easy, the JVM is less hot-patch friendly and really expects you to provide all the JARs at launch time.

Disclaimer: I work for Pivotal, we donate the majority of engineering to Cloud Foundry.

Re: Serverless Architectures

#94
post #89
post #81

Earlier quoted context omitted.

If GAE has had "serverless" for most of a decade, then why did Google decide to create Google Cloud Functions? https://cloud.google.com/functions/docs/

I think OP's chief argument is that "serverless" is monopolized by AWS Lambda and the like, and probably unfairly. The answer is that Cloud Functions and AppEngine fulfill different use cases. There's clearly room for both.

There doesn't appear to be a monopoly on "serverless" and the term has been used by many vendors including IBM at the last Serverless Conference[1].

There is definitely room for many kinds apps in the PaaS space, including serverless as well as microservices. OP was arguing that existing platforms like GAE have been supporting serverless and can continue to do so. However, the premise of the serverless computing movement is that newer platforms (e.g. OpenWhisk, Google Cloud Functions, AWS Lambda) are better for running serverless applications than traditional PaaSes (e.g. Heroku, Bluemix, OpenShift)

[1] http://serverlessconf.io/#agenda

Re: Serverless Architectures

#95
post #90
post #88

Earlier quoted context omitted.

I've been using Elastic Beanstalk lately and it's a true pleasure.

Curious about your use of beanstalk: I'm considering using beanstalk for a php app but we have content changes that are very frequent. 134 domains (virtual hosts) and maybe 500 pages (the html) change a day. How do you update the load balanced set of instances when the instances count changes? tks

Beanstalk doesn't like having more than one virtual host per application/server/load balancer. You can do it but its a lot of custom code to make it work. Beanstalk does do deploys very well though with automatic deploys to a subset of instances, checking they are working, then deploying to a new set of instances. Big fan but it is really designed for one domain per instance set.

Re: Serverless Architectures

#96

By this definition, we've been running "serverless" on Google App Engine for most of a decade. * We don't monitor how many instances are running and don't really care. Our "functions" are http endpoints. GAE spins up or down instances to meet the load. Our interface with "instances" is just the size of the bill at the end of the month. * Async task processing is also just an http endpoint function. We even have a lit…

I think one difference is that for many languages like Python, the http endpoints are hosted in one process. That's less horizontally scalable than lambda services.

Re: Serverless Architectures

#98

Earlier quoted context omitted.

It doesn't say "MySQL database". The client could conceivably connect to something like an ElasticSearch database (JSON API), setup with no auth/read-only permissions and appropriate rate-limiting.

You are really talking about a very small use case if you say the only database that could be used would be no auth/read-only considering most database requires auth for security and most apps need to write.

And then you use a "function" behind the gateway for the parts that need to write or need to see things that need authentication. Just like in the diagram...? Nothing says that you can only allow public access to a database.

Re: Serverless Architectures

#99
The one thing I haven't seen discussed in the serverless world is state as optimization.

For instance, if I have a machine learning application that has to access a very large trained model, I would like to load that model into memory at application startup. Loading from disk at every "function call" would be too slow. So would making RPC calls to some external "model cache" service.

Does AWS Lambda / similar have some sort of overridable "init"?

Re: Serverless Architectures

#100
post #87
post #81

Earlier quoted context omitted.

If GAE has had "serverless" for most of a decade, then why did Google decide to create Google Cloud Functions? https://cloud.google.com/functions/docs/

Functions looks interesting, but only supports node.js. GAE has the advantage that it support multiple language targets.

[deleted]
Post reply on HN