News for hackers. Stuff that matters.
Re:GitLab Serverless by napo on Wednesday December 12, 2018 @04:10AM (#18662445)
With serverless you only pay for a request and you (almost) don't care about scaling. While non-serverless implies that you have to manage how many server instances you want, and have them running and pay for them even if you have no traffic.
Re:GitLab Serverless by titanix2 on Wednesday December 12, 2018 @04:52AM (#18662605)
I feel the whole "not paying for underused server" argument is pointless when a serverless solution is way more expensive than paying for an idle server.
Re:GitLab Serverless by jackpeterfletch on Wednesday December 12, 2018 @05:45AM (#18662800)
It isnt more expensive!

Our main path business path gets about 60,000 reqs min. For that, sure AWS Lambda would never compete. Not only would it cost more but you'd probably hit the concurrency limit in AWS Lambda.

But we also have an admin UI that gets about 2500 visits a day. We're running that for about $4 a month - with virtually no operational burden whatsoever, and with a reassurance of resilience.

We worked out that the inflection point of value is at about 3 million requests a month. (that's an fag packet estimate, arbitrarily expensive 'request', your mileage may vary).

Its no silver bullet, but for some applications, particularly personal projects, low traffic and startup scenarios it can be ideal.

Re:GitLab Serverless by dullgiulio on Wednesday December 12, 2018 @07:41AM (#18663382)
I just hate it that discussions end up in people talking about keeping the function warm and quickly go downhill from there.

A managed app runtime can be great though: for those who tried Google AppEngine back in the day, it was amazing to work with.

Re:GitLab Serverless by 0x445442 on Wednesday December 12, 2018 @08:30AM (#18663671)
>> Our main path business path gets about 60,000 reqs min. For that, sure AWS Lambda would never compete.

I'm curious about this statement because I'm currently working on a project where the intent is to port a legacy app to AWS Lambda. The legacy app is currently distributed across 96 VMs and handles ~ 50K reqs/min during normal times but can run into ~ 3M reqs/min during high demand.

Are you saying AWS Lambda can not scale to handle this type of demand and if so can you point me to some resources/references that explain this?

For the record, I'm not the one that came up with the architecture.

Re:GitLab Serverless by jackpeterfletch on Wednesday December 12, 2018 @10:22AM (#18664612)
mcrittenden is right in that it probably will cost more to run than just having the old processes run on ECS/EC2. Lambda charges a premium for maintaining its control plane and development of the product that only makes sense to pay if your app has 'idle time'.

But also there is a per account per region concurrency limit of 1000 parallel executions. That's shared across all lambdas. If you hit it, requests will not be for-filed, increasing this limit is entirely at Amazons discretion, and wont they necessarily do it. I stand corrected, see comment.

https://docs.aws.amazon.com/lambda/latest/dg/limits.html

In your case 3m reqs/min will be fine if each request can be completed in no more than 20 milliseconds, and then you'll be on the knife edge.

If you wanted to reap the benefits of Lambda on the development side, loose the limits and keep server costs low(er) you could deploy OpenFaaS or similar in ECS. However you then loose the operational benefits of a managed solution.

Re:GitLab Serverless by mjb on Wednesday December 12, 2018 @11:57AM (#18665482)
The 1000 concurrency is a default limit, and we're very happy to raise it if you need more. The instructions for a limit increase request are here: https://docs.aws.amazon.com/lambda/latest/dg/concurrent-exec...

(Source: I work on Lambda at AWS)

Re:GitLab Serverless by jackpeterfletch on Wednesday December 12, 2018 @12:12PM (#18665642)
Fair play - added a correction, that statement came from discussions with our DevOps facility rather than first hand contact with Amazon, so there could be something else going on.
Re:GitLab Serverless by mcrittenden on Wednesday December 12, 2018 @08:54AM (#18663884)
I think he/she meant that Lambda wouldn't compete on pricing (as opposed to on performance).
Re:GitLab Serverless by geerlingguy on Wednesday December 12, 2018 @09:43PM (#18669486)
Both pricing and performance. It will scale, but it’s gonna cost a ton, and won’t be faster than running servers (and could be considerably slower for a percentage of requests).
Re:GitLab Serverless by ric2b on Friday December 14, 2018 @04:05AM (#18679474)
So the main advantage is that it scales easily, but then it's only cheaper if you actually don't need it to scale?
Re:GitLab Serverless by ddorian43 on Wednesday December 12, 2018 @05:34AM (#18662741)
But it's so much cheaper bud (it's not). It maybe is only when you're doing <= $10/month.
Re:GitLab Serverless by mickael-kerjean on Wednesday December 12, 2018 @07:00AM (#18663160)
I don't know if it's the HN effect but I never had a scaling problem. Prior acquisition the story says whatsapp used to run on a single server
Re:GitLab Serverless by ddorian43 on Wednesday December 12, 2018 @07:53AM (#18663444)
It depends on the type of application. But when at 5pm your traffic grows by 200x (hint: it doesn't) and you petascale your aws vps megafleet (hint: you don't, especially your database you don't) then you are on route to unicorn-scale hypergrouth cash-money-team-happiness.
Re:GitLab Serverless by tracker1 on Wednesday December 12, 2018 @06:11PM (#18668527)
My personal take is this...

1. start with docker (or dokku), on a single server, it's easy enough to get going, automate CI/CD. Make sure your backups are working and relatively frequent.

2. Break your lower environments on to a separate server.

3. Break out your database, and set up redundancy at that layer. Leverage DBaaS if you can.

4. Grow to multiple app/api instances for redundancy, and setup rolling deployments.

5. Scale Vertically (bigger servers/instances)

6. Migrate to Kubernetes and expand your automation and tooling.

7. Break apart your application into smaller pieces to scale individually. Possibly leveraging platform tools like Lambda/Functions.

8. Work towards redundant datacenter and application data sharding to deliver a closer experience.

By the time you get to 5-6, you should be making money or have a good investor strategy in place for capital. There's very little need to go all out when at concept or earlier release stages.

6-8 may take place in a different order, depending on your needs.. but again, you should have money or have raised capital by this point, or you have a relatively good problem to have otherwise.

IIRC Stack Overflow grew vertically pretty big on a single server, then two (db/application split).

Re:GitLab Serverless by seanwilson on Wednesday December 12, 2018 @04:32AM (#18662535)
Also, you don't need to worry about server security or server setup outside of the code you're running. With a typical VPS, you'd have to install software updates yourself and have a plan for how to set up a server from scratch again if needed (nontrivial if you do a lot of setup manually over SSH).

Essentially, a good way to set something up that requires minimal maintenance.

Re:GitLab Serverless by icebraining on Wednesday December 12, 2018 @04:57AM (#18662625)
They were talking about Webhosting, not VPSs. With webhosting, the hosting company usually manages the software, you just dump your code (or cgi-bin binary) into a directory. For example https://www.hostgator.com/web-hosting
Re:GitLab Serverless by nightfly on Wednesday December 12, 2018 @04:36AM (#18662545)
Just like old shared webhosting :)
Re:GitLab Serverless by shaunpud on Wednesday December 12, 2018 @07:20AM (#18663269)
I made a quick list[0] of cheap shared hosting providers I found on LEB[1]

[0] https://gist.github.com/shaunpud/35f77b542eaec7c7024bbb15c2e... [1] https://lowendbox.com

Re:GitLab Serverless by icebraining on Wednesday December 12, 2018 @04:54AM (#18662618)
Most webhosting plans are fixed monthly fees, AFAIK. The only one I knew that billed for used resources was NearlyFreeSpeech.
Re:GitLab Serverless by blacksmith_tb on Wednesday December 12, 2018 @06:40PM (#18668670)
Re:GitLab Serverless by icebraining on Wednesday December 12, 2018 @08:22PM (#18669171)
Was, at the time I last looked at it :)