News for hackers. Stuff that matters.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by paulgb on Monday July 30, 2018 @11:12AM (#17644940)
I don't understand the knee-jerk opposition people have to serverless architectures. I recently developed a service[1] with the serverless framework and it was the first time I enjoyed developing server-side code since the era of PHP on shared hosts, where you could just upload code and refresh the page. There's something freeing about never having to think about the server process or what happens if the server is power cycled.

So congrats on the funding, I hope you can convert some haters :)

[1] obligatory plug: https://notify.run

Re:Serverless, Inc. lands $10M Series A to build serverless ... by Zelphyr on Monday July 30, 2018 @02:56PM (#17646979)
It feels like a giant step backward from a development standpoint. It's as bad or worse than the days when I had to make a change, save it, FTP that file to the server, refresh, lather-rinse-repeat. Want a debugger? Nope. Want log files? Gotta get them from a different service that frequently has a lag of 30 seconds or more[1]. Don't get me started on the massive vendor lock-in inherent with a Serverless Architecture[2].

Don't get me wrong; from a resources management and scaling perspective it's great. But that doesn't outweigh the massive pain during development that it creates.

We're in the process of rebuilding a project to move everything out of a Serverless Architecture. After six months of building it on serverless we finally all agreed it was a big mistake.

[1] That's our experience with AWS. May be different with other providers.

[2] I recognize that Serverless Framework helps mitigate this but that's just yet another abstraction on top of abstractions in my opinion.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @03:50PM (#17647407)
I don't disagree with you that serverless is a step backwards if you want control about your running platform but your debugger example can be argued away by the fact that you shouldn't really be debugging a live platform. If your code is portable enough to run "serverless" then you should be able to spin up a docker container or whatever and run the same tests in there.

I think the issue is some people see "serverless" as an all or nothing scenario which it really isn't. Some problems are solved well with serverless and some are not. It's like the container vs virtual machine argument. One isn't designed to replace another - they're just different tools for solving different problems; each have their own strengths and weaknesses.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by Zelphyr on Monday July 30, 2018 @03:56PM (#17647459)
How do I debug locally/on Docker with services like SNS and ElasticTranscoder? I know there are emulators but those have gaps in services that providers like AWS offer. Not to mention, I'm debugging with an emulator and not the real thing.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by scarface74 on Monday July 30, 2018 @08:31PM (#17649562)
I can’t speak for ElasticTranscoder, but there is nothing stopping you from running your lambda function locally and still connect to all of the AWS services.

Just like people have been calling their controller actions from test harnesses for ages to test their APIs. You can call call your handler the same way.

At the end of the day, AWS is just passing you a JSON message. You can call your lambda function manually with the same JSON payload locally.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Tuesday July 31, 2018 @01:49AM (#17650827)
This is exactly how we test our lambda code that call AWS media encoders
Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @04:07PM (#17647538)
You could run the docker container on an EC2 instance or have an SSH bastion / VPN tunnel between yourself and your AWS VPC.

I tend to opt for the SSH tunnel route for personal projects but use OpenVPN with a secrets management (eg Vault or AWS's new key store) for professional projects (ie when you have several people on your team).

AWS is versatile enough that you do actually have several options available to you.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by matchagaucho on Monday July 30, 2018 @03:09PM (#17647087)
Serverless architecture certainly benefits from a localhost-first environment with mock data and unit test feedback prior to deployment.

But then... any architecture benefits from localhost-first.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by Zelphyr on Monday July 30, 2018 @03:38PM (#17647320)
We found that the further we got into using different services the more difficult local development became. I just assumed that, as in the old days of web development, we would be forced into not being able to do local development at all. So then we'd have to have duplication of services. One for development and one for production. Or multiples for development so that each developer didn't step on the toes of the other. There goes the cost savings touted by Serverless Architecture.

These are problems that will be solved eventually, I have no doubt. But they haven't been solved yet and that is what makes Serverless Architecture not ready for prime time in my opinion.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Tuesday July 31, 2018 @02:08AM (#17650910)
It's good practice to have separation of dev and prod service anyway. I don't see that as duplication, I see that as different operating environments.

Even back in the days of self hosting, I've lost track of the number of times a Dev script has gone wild and caused excessive load on the RDBMS or tried to spam the SMTP relay. On a Dev environment you can catch that without affecting live services.

As for the other issues you meantioned, this is nothing new. There have always been appliances in IT. Whether it is physical rack mountable appliances like hardware video encoders, or SaaS solutions on a public cloud like AWS media transcoders, you interact with then the same. The only difference with public cloud solutions is you you first have to bridge your office network with your AWS (or whatever) virtual private network. Thankfully you have a variety of tools at your disposal to do that. (Over the years I've used no less than 4 different methods to bridge a local network with an AWS VPC - each taking advantage of their own specific business requirements).

Re:Serverless, Inc. lands $10M Series A to build serverless ... by mmt on Tuesday July 31, 2018 @05:29PM (#17657368)
> There have always been appliances in IT.

Indeed, and, as a general rule, they were astonishingly expensive, especially in up-front purchase cost.

> The only difference with public cloud solutions

I posit that another difference is that the up-front cost is approximately zero. That makes the adoption decision much easier (even possible in the first place) for much smaller companies, especially startups.

That also means what would otherwise have been an up-front cost is hidden in the pay-as-you-go cost.

That cost-hiding does create a new problem, albeit a sublte on. A startup faced with having to buy a $300k appliance might think nothing of it if there were a smaller/dev version available for $30k for that environment. However, if that appliance actually needed to be duplicated in the full $300k form [1] in both (or maybe more, if they have stage/qa/integration, research, and/or multiple dev envs), that startup would take a serious look at alternatives. Those relative costs aren't as stark with the cloud version of applicances, until well after the choice has been made.

[1] Or, worse, an even more expensive version, if dev, testing and/or research use of the appliance is heavier than production. I expect that's a rare, outside of storage.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by jjeaff on Monday July 30, 2018 @03:13PM (#17647110)
Localhost first is ideal. But not always possible.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by eyjafjallajokul on Monday July 30, 2018 @03:29PM (#17647254)
Can you explain why?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by Zelphyr on Monday July 30, 2018 @07:07PM (#17649018)
Why its ideal or not always possible?

Ideal because it's faster development time. And free since I'm not paying Amazon compute time to run my code while I write it.

Not always possible because I don't have AWS's services locally. As mentioned elsewhere, there are emulators but, by virtue of their emulation, may not always perform like the real thing. That's a debugging ball of wax that I personally hate having to untangle.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by scarface74 on Monday July 30, 2018 @08:36PM (#17649591)
Which services are you using for which you are concerned about cost while you are developing?

You can access most (all?) of AWS services without running on AWS EC2/Lambda.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by chii on Monday July 30, 2018 @07:41PM (#17649259)
Can't these services be mocked out? Surely you are wrapping the service API with your own code to prevent vendor lock in right?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by jdo20bbx on Monday July 30, 2018 @08:17PM (#17649481)
Doesn’t everyone just spinup and teardown either an EC2 based Docker host or and EKS worker as needed?

Especially for CRUD apps and otherwise simple apps, testing should start after git push.

Don’t want to wait each time? Automatic build and teardown of test envs on a schedule, to avoid always up.

I still local test low-level code. But anything running in a cloud should really just be tested there.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by jjeaff on Thursday August 02, 2018 @01:56PM (#17673737)
Proprietary software or hidden configurations. I have my site on localhost docker container. But I can't spin up an Aurora instance. So I use a similar mysql container. But it's not exactly the same.

And sometimes the data is too large to have fully on localhost. You can work with a subset, but if you have a 2tb database, it's not feasible to have the whole thing local for testing.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by dsp1234 on Monday July 30, 2018 @03:54PM (#17647448)
Re:Serverless, Inc. lands $10M Series A to build serverless ... by Zelphyr on Monday July 30, 2018 @03:59PM (#17647479)
That's great. I'm sure Amazon and Google will follow suit. But they're not there yet and Amazon is the big guy that most people are on.

As I've said before; these are all problems that all of the cloud providers will solve eventually. But until they do I'm not sold on building a production application on a Serverless Architecture.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by inopinatus on Monday July 30, 2018 @08:05PM (#17649413)
These are complaints about the immaturity of the implementations. About which I’m inclined to agree but still recognise that the architectural style has legs.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by stcredzero on Monday July 30, 2018 @08:42PM (#17649625)
It feels like a giant step backward from a development standpoint. It's as bad or worse than the days when I had to make a change, save it, FTP that file to the server, refresh, lather-rinse-repeat.

So what if I gave you a command-line tool to simply make the current code in your development environment live?

Want a debugger? Nope.

And I also gave you live step debugging, plus replays of recent server state?

Want log files? Gotta get them from a different service that frequently has a lag of 30 seconds or more.

And the logs from the instance you're debugging are available instantly?

Re:Serverless, Inc. lands $10M Series A to build serverless ... by hayd on Monday July 30, 2018 @08:45PM (#17649646)
I'm a big fan of serverless, but these are valid questions to which there really ought to be better answers than "nope".
Re:Serverless, Inc. lands $10M Series A to build serverless ... by stcredzero on Monday July 30, 2018 @09:16PM (#17649776)
I'm working on making all of those a "yup."
Re:Serverless, Inc. lands $10M Series A to build serverless ... by rawrmaan on Monday July 30, 2018 @11:25AM (#17645059)
I think a lot of people have tried “serverless” and found it to present more challenges than it solves. How, for example, do you connect to a Postgres database from Lambda/Cloud Functions? As far as I can tell, the answer is: You don’t, you use a different database.

No-worries devops experiences are nothing new. See Heroku.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by yoran on Monday July 30, 2018 @11:36AM (#17645165)
I think the example you give is more because there's a mismatch between technologies, rather than the "fault" of serverless. In serverless, your endpoints become infinitely scalable. This doesn't go well when they're backed by technologies where there is a hard limit on the number of connections, for instance SQL servers or a Redis server. I think therefore that SQL database technologies have to adapt to the serverless paradigm rather than dismissing serverless "because it brings so many other issues". I think AWS has already started that with Amazon Aurora.

That aside, I agree that there are a lot of secondary concerns that are important when running things in production but that aren't available out-of-the-box when you run something on AWS Lambda. I'm thinking about error monitoring, performance monitoring, logging,... All those things need to be set up and that's quite time-consuming.

However, I think that's more due to serverless being relatively new and not as mature as the traditional way of doing. I don't think it will take long before we'll have the equivalent for serverless of adding `gem 'newrelic_rpm'` to your Gemfile and magically having performance and error monitoring across your app.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by rantanplan on Monday July 30, 2018 @12:04PM (#17645449)
> I think therefore that SQL database technologies have to adapt to the serverless paradigm rather than dismissing serverless

Empty statement that means nothing. SQL/RDBMS is backed by computer science and robust engineering examples that make the world spin. Alternatives are usually full of fanfare and false promises.

> I think AWS has already started that with Amazon Aurora.

Just in time when we were talking about fanfare. Spend 10-20 minutes searching on the Internets to see what actual experiences people have with it.

Its 3X write increase? Bollocks. Usually the performance is worse than when you administer your own DB(Postgresql/MySQL). You might(or not) see some read-performance increase, which... well everyone can scale on reads so I don't see the point.

I suspect it has other goodies pertaining to administration/provisioning, but performance/scaling is not one of them.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by athenot on Monday July 30, 2018 @12:29PM (#17645671)
>> I think therefore that SQL database technologies have to adapt to the serverless paradigm rather than dismissing serverless

> Empty statement that means nothing. SQL/RDBMS is backed by computer science and robust engineering examples that make the world spin. Alternatives are usually full of fanfare and false promises.

Traditional relational databaases have indeed solved many issues that some newer datastores struggle with. But the flip side is that it is non-trivial to design traditional databases that are not Single Points Of Failure.

Storing data is surprizingly hard in a cloud environment, and involves trade-offs. Reaching a comprehensive solution (fast, HA, consistent, easily recoverable, scalable volum, evolvable schemas...) is hard no matter what technology you pick.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by justincormack on Monday July 30, 2018 @01:51PM (#17646445)
Not being able to handle more than a few connections without connection pooling is nothing to do the using SQL. It is just a different bit of optimization that is needed to support fast transient connections without pooling.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by rawrmaan on Monday July 30, 2018 @05:42PM (#17648339)
It just seems to me like the "infinite scalability" promise of serverless is only realistic if you have no database. Because inevitably, you'll hit database scaling issues due to query patterns and suboptimal indexes LONG before you'll have a hard time scaling up your fleet of servers because you're getting too many requests.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by zaarn on Tuesday July 31, 2018 @09:37AM (#17652997)
I'd also like to see the AWS bill once you hit infinite scale. AWS is already pretty expensive on their own...
Re:Serverless, Inc. lands $10M Series A to build serverless ... by ryanworl on Monday July 30, 2018 @11:34AM (#17645154)
You connect the same way as you do in a regular app. Which is to say, you open the database connection outside of the request handling method (for example, as a global) and then use it from within the request handling method. When your app wakes up again for another request, the database connection is still open and you just use it.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by qudat on Monday July 30, 2018 @07:57PM (#17649357)
As far as I know this works but more as a hack not as a robust officially supported solution.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by scarface74 on Monday July 30, 2018 @08:44PM (#17649637)
How is that a “hack”? You create your DB and you get a connection string to a publicly accessible database or you create it inside a VPC and you configure your lambda to run inside a subnet within your VPC and you configure your security group. This can all be configured within the console.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by nrb on Monday July 30, 2018 @10:55PM (#17650197)
The main issue with this approach is that running your lambda in a VPC results in painfully slow cold starts, on AWS at least.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by paulddraper on Tuesday July 31, 2018 @10:08PM (#17659091)
IDK why the parent mentioned VPC. It's not necessary.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by scarface74 on Wednesday August 01, 2018 @10:34PM (#17668876)
Without a VPC, how do you not expose your Aurora cluster to the world?

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Auror...

Aurora DB clusters must be created in an Amazon Virtual Private Cloud (VPC). To control which devices and Amazon EC2 instances can open connections to the endpoint and port of the DB instance for Aurora DB clusters in a VPC, you use a VPC security group. These endpoint and port connections can be made using Secure Sockets Layer (SSL). In addition, firewall rules at your company can control whether devices running at your company can open connections to a DB instance. For more information on VPCs, see Amazon Virtual Private Cloud (VPCs) and Amazon RDS.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by brylie on Monday July 30, 2018 @11:37AM (#17645179)
I may misunderstand your comment.

That said, where I work (MaaS Global) we have a production PostgreSQL database hosted on AWS Relational Database Service (RDS):

https://aws.amazon.com/rds/postgresql/

We connect to the AWS RDS instance in our lambda functions using an ES library called knex.js and some environment variables to store the DB credentials:

https://knexjs.org/

Re:Serverless, Inc. lands $10M Series A to build serverless ... by joecot on Monday July 30, 2018 @11:46AM (#17645263)
How do you deal with the 10+ second cold start times for Lambda when using it in a VPC? Are you pre-warming your lambda functions? Did you open up your RDS instance to the world so you could connect to it from a public lambda network? I know you had to pull some magic, because I've been down that road.

It's been a problem for years and there's been no sign of a solution. Example article from last month: https://medium.freecodecamp.org/lambda-vpc-cold-starts-a-lat...

These are the sorts of problems that turn people off from using serverless architectures.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by kauju on Monday July 30, 2018 @12:00PM (#17645419)
Your right that the cold start times are not ideal. But you get a huge free request load per month. Put an uptime pinger on it and keep it warm. Or do what I do and write your functions in golang. My average cold start time is around 4 seconds.

For the DB connection you put the lambda in the same vpc that the RDS exists in. Then you open the connection pool and reuse it if its active. Not that a new connection is a big overhead over leveraging an established socket.

Wonder where all this misinformation is coming from on lambda DB access issues.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by sbov on Monday July 30, 2018 @12:17PM (#17645582)
I know uptime pingers are easy and obvious solutions (I use them myself), but everytime I have to resort to this sort of hack it reminds me of how immature serverless is.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by joecot on Monday July 30, 2018 @12:52PM (#17645882)
Here's the problem. Uptime pingers work great if you have a low volume service. You keep 1, 2, or maybe 3 instances of the function warm, and you don't have to deal with cold start times. But there's 2 places that idea falls seriously flat.

1. This doesn't work if you were actually trying to build your API as microservices. You might have 60+ functions, some which call each other, and keeping them all warm is not really a good option.

2. Keeping a minimum number of instances warm fails to account for half the point of using serverless architectures: being able to scale. Sure, if you have little to no traffic, you can keep a couple instances warm and be up, but if your app needs to scale to 5 or 10 or more instances to handle bursts of traffic, the surfers who hit that cold start end up dealing with an extremely bad experience.

More importantly, as Lambda gets more popular, uptime pingers get less and less useful because of tragedy of the commons. The reason for needing cold starts at all is that AWS is rotating out instances to be able to keep up with overall demand with limited resourcs. If only a few people are sending heartbeats to their instances, their instances stay in rotation because other people's get rotated out instead. If everyone is sending heartbeat requests, some of them will still end up getting rotated out, and therefore everyone will need to increase the frequency of the heartbeat requests to keep their functions warm. It's not a sustainable solution, and I'm baffled that AWS tacitly promotes it as a resolution to the problem they themselves have caused.

It's been years. AWS needs to fix Lambda VPC cold starts.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by wahnfrieden on Monday July 30, 2018 @01:45PM (#17646399)
AWS is fixing it by moving to IAM authentication in the serverless ecosystem, rather than network segmentation. Serverless Aurora will support IAM auth at scale via its HTTP query protocol.

Keeping Lambda functions warm is great until you have 2 or more requests hitting the function simultaneously. They won't queue behind the pre-warmed function, they will spin up additional Lambda containers to serve in parallel. Unless you don't expect to get concurrent requests, there's no effective way to pre-warm Lambda functions.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by dpeck on Monday July 30, 2018 @04:18PM (#17647618)
Have any data on the variance on that 4 second average? That sounds very tolerable on its face.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by jchrisa on Monday July 30, 2018 @12:25PM (#17645636)
My employer offers FaunaDB with a pay-per-request pricing model. To bypass cold-start lambda issues, I code the app to talk directly to the database. For certain richer functions I might invoke a Lambda, but for basic crud operations the database access control does the trick. And no cold-start issue.

Here's the data model part of my todo app if you want to see queries in the app: https://github.com/fauna/todomvc-fauna-spa/blob/master/src/T...

Re:Serverless, Inc. lands $10M Series A to build serverless ... by joecot on Monday July 30, 2018 @01:02PM (#17645986)
AWS also has NoSQL cloud solutions, particularly DynamoDB, and maybe SimpleDB if you want to risk building on a someday deprecated service.

Those options work fine, if you were OK with using a NoSQL DB. But what if you wanted to use an actual relational database? For that you pretty much need Lambda in VPC, and it's not really usable because of the cold start issue.

At some point Amazon will release Aurora Serverless[1], giving a serverless option for an on demand relational database. Will that work somehow with Lambda without needing VPC, therefore defeating the cold start issue? What cold start issues we'll it have itself? I guess we'll wait and see for now.

1. https://aws.amazon.com/rds/aurora/serverless/

Re:Serverless, Inc. lands $10M Series A to build serverless ... by cmjqol on Monday July 30, 2018 @12:41PM (#17645776)
> My employer offers FaunaDB with a pay-per-request pricing model.

Tried FaunaDB few month ago the latency was beyond 200ms for a simple a read , and beyond 600ms for an insert.

Would not recommend it at this point.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by jchrisa on Monday July 30, 2018 @02:42PM (#17646870)
We don’t expect you to see that lag. Other users don’t see it or haven’t reported it. What region are you accessing in and how did you generate the result?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by com2kid on Tuesday July 31, 2018 @07:11PM (#17658139)
> How do you deal with the 10+ second cold start times for Lambda when using it in a VPC?

And I was complaining about 500ms cold start times on Firebase Functions.

I think I'll stop complaining now.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by wahnfrieden on Monday July 30, 2018 @11:32AM (#17645136)
It’s still the early days so there are pain points, but Amazon already announced a solution to this: Serverless Aurora. It’ll be some time still until it’s public and Lambda-friendly though. And MySQL comes before Postgres.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by nodesocket on Monday July 30, 2018 @04:37PM (#17647796)
With Google Cloud Functions (they got the name right), you can simply link with a Cloud SQL instance using a special local socket interface provided by Google Cloud[1]. Their documentation provides complete examples as well on how to use global connection pools for MySQL and PostgreSQL.

[1] https://cloud.google.com/functions/docs/sql

Re:Serverless, Inc. lands $10M Series A to build serverless ... by rawrmaan on Monday July 30, 2018 @05:39PM (#17648312)
Okay, that's a great solution. I actually had no idea that was possible.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by all_blue_chucks on Monday July 30, 2018 @01:24PM (#17646208)
> How, for example, do you connect to a Postgres database from Lambda/Cloud Functions?

Exactly the same way you would with an EC2 instance...

Re:Serverless, Inc. lands $10M Series A to build serverless ... by tango12 on Monday July 30, 2018 @01:41PM (#17646347)
Might not be that easy because only postgres can take a few hundreds of connections which won't work out if you have a few thousands of serverless functions? No persistent connection pools.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by somebodythere on Monday July 30, 2018 @01:42PM (#17646363)
Well, just put the connection logic outside of the main handler so it's shared between invocations!

Wait, oops, you have state now.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by rhlsthrm on Monday July 30, 2018 @08:04PM (#17649405)
Realistically could you do this with Redis or something similar? Not sure about security implications of this though...
Re:Serverless, Inc. lands $10M Series A to build serverless ... by GordonS on Monday July 30, 2018 @01:53PM (#17646482)
How do you handle database connection pooling?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by ironjunkie on Monday July 30, 2018 @02:17PM (#17646670)
I fully agree with you. Based on my experience, Lambda is perfect if you only want to perform some relatively standalone task (such as a compute intensive rendering). As soon as it needs to connect to 3rd party entities, it becomes very slow and loses some of its benefits. Connecting Lambda to an AWS DB for example is challenging to say the least. It also takes a couple tens milliseconds just to setup the DB socket and connection, that on a normal server can simply remain open and wait for the next request.

Serverless is nice, but the ecosystem of serverless tool is really missing today IMO

Re:Serverless, Inc. lands $10M Series A to build serverless ... by scarface74 on Monday July 30, 2018 @08:50PM (#17649670)
Connecting Lambda to an AWS DB for example is challenging to say the least.

Why does this keep getting repeated? You get a publicly accessible host and use the same drivers you use on prem or you put both the lambda and the database inside your VPC.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by bmilleare on Wednesday August 01, 2018 @05:11AM (#17660821)
As others have pointed out, connecting to RDS from Lambda is actually pretty trivial by having them run in the same VPC. We actually came up against an issue where our Lambda function needed access to RDS but also to the outside World which meant some extra hurdles to jump [1] but overall our experience with Lambda has been a positive one.

I don't think we'll be considering a fully serverless architecture anytime soon due to cold-start times, but it's awesome for anything outside of the user request/response loop or internal microservices where response time is perhaps not such of a problem.

[1] https://aws.amazon.com/premiumsupport/knowledge-center/inter...

Re:Serverless, Inc. lands $10M Series A to build serverless ... by dhdersch on Monday July 30, 2018 @03:13PM (#17647113)
Umm, for AWS, you place the Lambda function into a VPC and open a db connection the same way you would from another server?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by spullara on Monday July 30, 2018 @03:34PM (#17647289)
I think what they are referring to is that Postgres and most other databases were built in the before time, the long long ago when every connection was a process and you limited concurrency of connections in the configuration file. If you have a 1000 concurrent calls on lambda you aren't going to be able to have them all talking to the same database at the same time. You'll run out of connections and the application will crash. Same reason you see this happen to PHP web applications when HN or Slashdot is pointed at them and they say they can't connect to the database. They have hit the concurrency limit. Connection pooling solves this problem but currently requires another layer between the application and the database.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by scarface74 on Monday July 30, 2018 @08:40PM (#17649612)
What do you mean, how do you connect? The same way you connect on prem. Using, the Postgres drivers. You can either have a publicly accessible Postgres instance with a DNS entry (not recommended) or you can run both the DB and the lambda inside of a VPC.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by dpeck on Monday July 30, 2018 @11:40AM (#17645206)
That’s really what’s keeping me from developing stuff with it. I can get the job done with dynamodb but I’m really looking forward to building something with Postgres in a “serverless” context.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by ac360 on Monday July 30, 2018 @02:11PM (#17646624)
imo, the most interesting data point is how in demand serverless architectures are WITH these issues. Imagine how compelling serverless will be once these issues are solved.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by chx on Monday July 30, 2018 @01:39PM (#17646334)
Serverless is a buzzword for a distributed system you can't SSH into.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by paulgb on Monday July 30, 2018 @01:43PM (#17646365)
I can't tell if that's meant to be a pejorative, but a distributed system I can't (and don't need to) SSH into makes my life easier :)
Re:Serverless, Inc. lands $10M Series A to build serverless ... by old-gregg on Monday July 30, 2018 @02:31PM (#17646777)
The comment above probably meant to say that any environment becomes "serverless" as soon as you stop managing instances/servers manually and interact with it strictly via an API endpoint, which of course has always been possible but required fairly in-depth knowledge of AWS APIs (or other cloud provider's).

Look, there's nothing dirty about re-framing the conversation every once in a while. It may feel like BS at first but over time we attach new meaning to old words and it becomes easier to communicate capabilities.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by lowercased on Monday July 30, 2018 @02:21PM (#17646702)
can't and not needing to are two really different things. the 'not needing to' just being shifted to having to use proprietary environments for doing stuff essential to debugging (like looking at log files) is, for most people, not a net win.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by manigandham on Monday July 30, 2018 @11:49AM (#17645299)
Because it should really just be called Functions-as-a-service, and they are great for single-focus reactive/connective processing and 1-off tasks but are not a replacement for everything as people try to use it for.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by k__ on Monday July 30, 2018 @12:06PM (#17645473)
As far as I know, serverless isn't just FaaS. As you pointed out FaaS is to connect things, nothing more.

For me serverless is pay-as-you go pricing, no over- or under-provisioning and last but not least, no server-management.

Lambda, DynamoDB, S3, AppSync, Device Farm, Aurora, etc. are all serverless.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by castlecrasher2 on Monday July 30, 2018 @01:33PM (#17646283)
> Lambda, DynamoDB, S3, AppSync, Device Farm, Aurora, etc. are all serverless.

Yep. Lambda may be functions-as-a-service, which is a great name for it, but the whole shebang is more than that. Thus, serverless.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by detaro on Monday July 30, 2018 @02:27PM (#17646750)
How would you distinguish it from "PaaS"?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by k__ on Monday July 30, 2018 @05:05PM (#17648025)
The "serverless" model frees you of more tasks than PaaS, like capacity planning and scaling, also it's more flexible and fault tolerant.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Monday July 30, 2018 @02:08PM (#17646601)
Why shouldn't it be called serverless?

As a consumer, I essentially get to treat it as such - there is no server I need to manage.

In AWS-land this is a big differentiator over a system I have to manage, such as EC2, that just executes containers (meeting FAAS). Now I have FAAS and I don’t have to manage the infra, which is huge because AWS will be far better at meeting a patching SLA than I will be.

Yes, obviously there is a “server”, but I don’t have to think about it.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by manigandham on Monday July 30, 2018 @07:29PM (#17649169)
No server to manage is the least important part of it all. It should describe the abstraction that's actually being offered: IaaS is servers, PaaS is a single app, FaaS is individual function, SaaS is just software.

Any of those other than IaaS itself can be "serverless".

Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Monday July 30, 2018 @07:30PM (#17649179)
> No server to manage is the least important part of it all.

OK, well it's the most important part for me. I don't want to manage patching a box.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by manigandham on Monday July 30, 2018 @09:13PM (#17649762)
Sure, but there have always been options for that, regardless of abstraction level.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Tuesday July 31, 2018 @12:15PM (#17654450)
I don't know of an abstraction that provides FaaS + Managed System other than serverless - what are you referring to?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by detaro on Monday July 30, 2018 @02:27PM (#17646743)
We called that "PaaS" for years, why does it need a new name suddenly? Especially a new name that can cause confusion with things that actually do not have a dedicated server?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Monday July 30, 2018 @02:28PM (#17646756)
I think PaaS is overly broad.

And yes, marketing is a real thing, and names are also picked because they sound cool. There are worse things.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by Yver on Monday July 30, 2018 @07:15PM (#17649073)
I can't say much about its technical merits but I find it misleading that an application be described as "serverless" when in actuality it very much uses servers. The "serverless" moniker comes from the Serverless Framework, produced by Serverless, Inc. "Serverless" is the name of a product and should be capitalized accordingly.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by everdev on Monday July 30, 2018 @11:58AM (#17645395)
I think the biggest knock against serverless is the same as microservices: your points of failure grow significantly.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Monday July 30, 2018 @02:10PM (#17646610)
I don't see how. Your points of failure were always there, but at most they're more explicit since "service failure" conflates with "network failure" - something I think is beneficial, since you always had to handle "service failures" but they were implicit.

That is - a piece of code in a monolith may fail, and a piece of code in a microservice may fail, but I've already written the code to handle network errors for the microservice case, which means I've also implicitly handled the "bug in code" case.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by SahAssar on Monday July 30, 2018 @03:30PM (#17647261)
That assumes that a local function call has the same failure rate as a remote function call to a microservice, which in my experience is very much not true.

If I have a local function in the same language I can pretty much assume that a call to that function will actually call that function. With a remote call over HTTP or whatever I can't, so that is an additional failure I need to handle.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Monday July 30, 2018 @04:06PM (#17647530)
I'm not sure I understand. Why would an RPC call a different function than what you expect?

I'll grant you that there is more complexity in this approach, but I believe that fault tolerance is something you improve with microservices, not something you regress on.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by squeaky-clean on Monday July 30, 2018 @05:37PM (#17648296)
It's not that it would call a different function, but that sometimes the RPC will fail to call the function. You can't get a network error calling a function which is in memory on the same process.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Monday July 30, 2018 @06:39PM (#17648816)
This is what I was saying though.

Yes, you have to handle the failure case of "network call". Microservices add this failure case. But you already had to handle the case of "code blew up because of a bug".

By forcing you to handle comm errors like network failure, you also force people, implicitly, to handle "code blew up because of a bug" errors. Even though it adds a second error case, you pretty much handle them the same way in the same place.

There was always an error case - the fact that code may blow up.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by fauigerzigerk on Tuesday July 31, 2018 @04:14AM (#17651427)
>But you already had to handle the case of "code blew up because of a bug".

I'm handling bugs very differently than network failures though, because network failures are usually temporary while bugs are usually (or even by definition) permanent.

Dealing with temporary outages in lots of places is extremely difficult. You may need retry logic. You may need temporary storage or queuing. You may need compensating transactions. You may need very carefully managed restarts to avoid DDOSing the service once it comes back online. There may be indirect, non-deterministic knock-on effects you can't even test for properly.

Microservices cause huge complexity that is very hard to justify in my opinion.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by staticassertion on Tuesday July 31, 2018 @12:14PM (#17654446)
> I'm handling bugs very differently than network failures though, because network failures are usually temporary while bugs are usually (or even by definition) permanent.

Depends on the bug - there are transient bugs that are not networking related.

But let's assume it's a "hard error" ie: a consistently failing bug. I would say where that bug is makes a huge difference.

If it's a critical feature, that bug should probably get propagated. If it's a non-critical feature, maybe you can recover.

By isolating your state across a network boundary, recovery failure is made much simpler (because you do not need to unwind to a 'safe point' - the safe point is your network boundary).

But it often depends how you do it. I personally prefer to write microservices that use queues for the vast majority of interactions. This makes fault isolation particularly trivial (as you move retry logic to the queue) and it scales very well.

If you build lots of microservices with synchronous communications I think you'll run into a lot more complexity.

Still, I maintain that faults were already something to be handled, and that a network bound encourages better fault handling by effectively forcing it upon you.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by moduspol on Monday July 30, 2018 @02:08PM (#17646597)
The points of failure you are responsible for maintaining decrease significantly, though.

And the ones you aren't responsible for are ones that the rest of the world uses every day at 1000x the scale you do.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by skohan on Monday July 30, 2018 @11:22AM (#17645033)
I just hope the API has stabilized. I worked on a project a couple of years ago using serverless, and we sunk a ton of time into fixing breaking changes after updates.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by tenaciousDaniel on Monday July 30, 2018 @05:04PM (#17648015)
I help run a Node server, and we have some jobs that aren't run through CRON, but instead are set up using in-memory intervals. So I'm considering using a serverless setup to offload the work.

In your opinion, it easy to differentiate between dev/prod environments for development? How about logging?

Re:Serverless, Inc. lands $10M Series A to build serverless ... by qudat on Monday July 30, 2018 @08:00PM (#17649380)
Logging by default sucks for Lambdas. Because lambdas are not "servers" they do not have an external IP address, which means that if they want to communicate with the external world, you need to setup a NAT for it.

Differentiating dev/prod is not too bad, everything is labelled based on your naming scheme for serverless.

Having said that I think lambdas are a great use case for cron jobs.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by nostalgeek on Monday July 30, 2018 @02:24PM (#17646717)
> I don't understand the knee-jerk opposition people have to serverless architectures

because it's purely a marketing concern, it means nothing from an architectural standpoint, it"s a buzzword, like 'cloud', 'nosql', 'web 2.0' or 'the blockchain'.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by wnsire on Monday July 30, 2018 @02:39PM (#17646845)
> because it's purely a marketing concern, it means nothing from an architectural standpoint

Serverless computing is an system architecture design that focus emphasis is abstracting the entirety of the infrastructure to let developers focus solely on code.

Per say , with AWS Lamba + API Gateway + S3 developers can create Web Application that usually required EC2 Servers and web framework like Spring , Laravel etc...

Apps hosted on AWS with EC2 requires strong knowledge in system architecture and system design . They also are quiet complex to scale , monitor and manage.

Serverless abstract all this and lets you focus only on code.

AWS Lambda is self healing meaning when a function crash , only that function crash not the entire server , API Gateway is managed by AWS it won't crash ( or very unlikely ) S3 , as i'm concerned , as never let me down.

Meaning I could author an entire application similar to Hacker News without any "Server" logically speaking, technically speaking there is always a server just like NoSQL doesn't mean "NO SQL" but "Not Only SQL" and is not buzzword :)

Re:Serverless, Inc. lands $10M Series A to build serverless ... by na85 on Monday July 30, 2018 @11:28AM (#17645085)
I think it's due to the fact that the terminology seems intentionally misleading at worst, and like a marketing buzzword at best.

Every technical person understands there's still a server there. So it seems like a marketing tactic intent on misleading clueless CEOs.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by dragonwriter on Monday July 30, 2018 @11:54AM (#17645347)
> I think it's due to the fact that the terminology seems intentionally misleading at worst, and like a marketing buzzword at best.

Originally it was a marketing buzzowrd designed to make Amazon's FaaS offering seem like a bigger deal than it was, and somewhat misleading in that role because FaaS of the type it was applied to aren't any more serverless (even from the perspective of what the customer needs to manage) than common PaaS offerings.

OTOH, I kind of like the way Google seems to have adopted it as a blanket term for cloud services where the customer is not concerned with physical or virtual servers as such; it seems the term.is being wrestled into being descriptive and non-deceptive.

> Every technical person understands there's still a server there. So it seems like a marketing tactic intent on misleading clueless CEOs.

The non-existence of servers isn't what it communicates, only technical people who also lack any sense of what matters to business world think that. (It's also targeted more to CTOs/CIOs than CEOs).

Re:Serverless, Inc. lands $10M Series A to build serverless ... by paulgb on Monday July 30, 2018 @01:46PM (#17646404)
> Every technical person understands there's still a server there.

Everybody also knows that a wireless vacuum has wires inside it, the value prop is that the wires never get in your way. And so with serverless.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by pbreit on Monday July 30, 2018 @04:30PM (#17647747)
I don't think it compares to the move to the cloud. The cloud was a lot easier to setup than dedicated and the end result was basically the same...you got a server. Serverless is quite a different paradigm and the benefits are less obvious.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by matte_black on Monday July 30, 2018 @11:26AM (#17645068)
Lack of connection pooling for database connections means serverless architecture will never be used for serious data heavy apps.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by wahnfrieden on Monday July 30, 2018 @01:47PM (#17646408)
AWS already solving this with Serverless Aurora.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by whistlerbrk on Monday July 30, 2018 @11:49AM (#17645294)
not necessarily into this serverless thing but that doesn't seem like a valid complaint, use a global connection pooler like pgbouncer
Re:Serverless, Inc. lands $10M Series A to build serverless ... by patrickg_zill on Monday July 30, 2018 @12:11PM (#17645515)
Does e.g. Amazon's offering have a way to do that? Or is there still a cold start time? Where do you run the pgbouncer that is always running?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by gazarsgo on Monday July 30, 2018 @02:44PM (#17646892)
in AWS Fargate, of course...
Re:Serverless, Inc. lands $10M Series A to build serverless ... by matte_black on Monday July 30, 2018 @03:30PM (#17647258)
Try it.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by rightbyte on Monday July 30, 2018 @03:49PM (#17647387)
Serverless in this context is Server-aaS. It's doublespeak. That's why I "knee-jerk".

Instead of a couple of servers you have thousands of small virtual servers running on real server and call that serverless. It's comical.

I wonder what hell this approach will be for legacy serverless systems where there is stuff running everywhere and no one got a clue where to pull the plug or patch stuff.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by gaius on Monday July 30, 2018 @03:49PM (#17647392)
I don't understand the knee-jerk opposition people have to serverless architectures

It’s the name. It infuriates people because obviously there still really are servers. But I think of it like WiFi - there still are wires, you just don’t see them.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by mmt on Monday July 30, 2018 @04:22PM (#17647650)
I've read this analogy before, but it's weak enough to be inapplicable.

With wireless networking and even phones, the wires have actually been eliminated, replaced wholesale by something else, radio. A better analogy would be something like the powerline ethernet systems, but nobody is calling them something controversial like "wireless" or "cableless".

Put another way, I've seen cloud computing (of which "serverless" is, arguably, merely an evolution into increasing levels of abstraction) called "somebody else's servers". The equivalent with the Wifi analogy would be "somebody else's wires", and, usually, what wires there are, for the backhaul [1], aren't even somebody else's.

EDIT:

Ultimately, my point is this:

The analogy is weak becasue WiFi is not an abstraction layer on top of wired networking that merely hides the existence of (and, ideally, some of the downsides of dealing with) the wires, instead being a different technology with different upsides and downsides. Serverless is such an abstraction layer.

[1] Which brings up a nitpick: Wifi can remain even wireless in its entirety, with various mesh networking techniques.

[dead]
Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @05:13PM (#17648096)
I've wired data centres so I'm aware wires exist. However wires are not WiFi. The WiFi in your example ends at the base station. Everything thereafter is still infrastructure but it's not WiFi.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @03:56PM (#17647462)
Except there literally isn't any wires in WiFi. Unless you're talking about power cables on access points or other unrelated tech used on devices that have ethernet / whatever AS WELL AS WiFi?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by pvg on Monday July 30, 2018 @04:26PM (#17647696)
All-caps italics is an interesting choice. Is that both emphasized AND shouted?
Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @07:26PM (#17649146)
Haha yeah on reflection it does look a bit silly. I was intending for it just to stand out against the camelcase of "WiFi" but the caps was a poor choice in hindsight.
[dead]
Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @04:58PM (#17647967)
> Except there literally isn't any wires in WiFi.

> You think WiFi connects your laptop directly to the server in the datacentre? Interesting.

The way you've selectively quoted one sentence out of what is a very short post anyway just so you can imply that I'm oblivious to other infrastructure - even when my very next sentence describes other infrastructure - is in very poor taste.

Plus you're still failed to prove point. Yes ethernet over cat5e/6 cables and fibre exist, but they're not WiFi. Neither is 4G, Bluetooth, nor FM radio despite actually being wireless (unlike cat6 / fibre).

What you're arguing is beyond nonsensical; it's like saying "I drive to the railway station every morning therefore the train I then catch is also classified as a car."

The daft thing is if you'd talked about the wireless radio's antenna then you might have had a genuine point. Yet you went the "network cables are WiFi as well" argument instead. Go figure.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by gaius on Monday July 30, 2018 @05:13PM (#17648093)
is in very poor taste.

I believe my analogy to be a sound one, in that all wireless does is insulate the end user from mile upon mile of wiring, just as serverless insulated the user from racks upon racks of servers, and that you were - and are - being needlessly pedantic.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @05:20PM (#17648144)
I don't think it's being pedantic if your analogy is based on a basic premise that is fundamentally untrue. I get there is no such thing as a perfect analogy but I'd at least expect the subject to be factually acuate even if the comparison is subjective.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by dang on Monday July 30, 2018 @06:01PM (#17648530)
Would both of you please stop this ridiculous spat.
Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Monday July 30, 2018 @07:03PM (#17648993)
What spat? This is the first time I've chatted to the guy and I harbor no ill will towards him.

Isn't the point of HN that you can have a discussion when you disagree with someone?

Re:Serverless, Inc. lands $10M Series A to build serverless ... by dang on Tuesday July 31, 2018 @01:15AM (#17650705)
The point of HN is that you can have a civil, substantive discussion.

I called it a spat because you both got personal. It's nice that you both enjoyed it, but it's still against the rules here. It sets a bad example for others, who unfortunately aren't so convivial.

Re:Serverless, Inc. lands $10M Series A to build serverless ... by laumars on Tuesday July 31, 2018 @01:46AM (#17650817)
Condescending perhaps, but there was no personal attacks and certainly none any worse nor less substantive than your terse reply (which, it's worth mentioning, was also after the discussion had already reached its natural conclusion).
Re:Serverless, Inc. lands $10M Series A to build serverless ... by gaius on Tuesday July 31, 2018 @12:16AM (#17650498)
Likewise :-)