Live data from Hacker News

DigitalOcean Functions: A powerful serverless computing solution

digitalocean.com

61–70 of 93 posts

Re: DigitalOcean Functions: A powerful serverless computing solution

#61

I recently learn about this term, so can someone be kind enough to explain to me ELI5 serverless usage[0], advantages over "traditional" servers and why I should/could care? [0] by usage I mean, I still deploy my monolithic app, or just one function per route?

Not ELI5 but see https://github.com/cncf/wg-serverless/tree/master/whitepaper...

Some people go monolithic app but best practice is usually one function per route.

Traditional servers come with management overhead (e.g. defining/managing/monitoring scaling) and by using Serverless servers you avoid that overhead and optimize for good engineers which are almost always your bigger cost center.

Re: DigitalOcean Functions: A powerful serverless computing solution

#62
post #2

Ado from DO here. Happy to help in anyway I can. Super excited for DO Functions to finally go GA!

What is the underlying software used for DO functions? OpenFaas? Firecracker? gvisor? something custom to DO?

The foundation is Apache OpenWhisk https://github.com/apache/openwhisk with DO specific customization to work with App Platform, managed databases, trusted sources, log shipping, and other DO specific capabilities. The closest programming model is AWS Lambda in terms of the semantics and execution model.

Re: DigitalOcean Functions: A powerful serverless computing solution

#63
post #42

Earlier quoted context omitted.

Cloudflare workers: $0.15 per 1M requests per month, minimum charge of $5 per month. Free tier is 100 000 requests per day Here's the pricing page: https://workers.cloudflare.com/#plans

up to 10ms CPU time per request Not much of a room here it seems. AWS still offers more generous CPU time. In fact any price move by new entrants can be countered by AWS going forward. So AWS users benefit from not moving. Simply wait for others to reduce their prices and expect AWS to do the same.

There's some clarification on the "limits" page [1]:

> Most Workers requests consume less than a millisecond. It is rare to find a normally operating Workers script that exceeds the CPU time limit. A Worker may consume up to 10 ms on the Free plan and up to 50 ms for Bundled Workers on the Paid Plan. The Paid Plan also offers up to a 30 second duration for increased compute time. The 10 ms allowance on the Free plan is enough execution time for most use cases including application hosting.

> There is no limit on the real runtime for a Workers script. As long as the client that sent the request remains connected, the Workers script can continue processing, making subrequests, and setting timeouts on behalf of that request. When the client disconnects, all tasks associated with that client request are canceled. You can use event.waitUntil() to delay cancellation for another 30 seconds or until the promise passed to waitUntil() completes.

My understanding is that you could consume 1/10 ms of CPU time every hour, and your worker would hit the limit only after 100 hours for the free tier. This would also work with the paid plan - bundled, with up to 500 hours. However, this wouldn't work with the paid plan - unbound, as you pay GB-s, which are counted even if the CPU is not used. From the "Duration" part of "Limits":

> Duration is the measurement of wall-clock time. This is measured in Gigabyte-seconds (GB-s). When a Worker is executed, it is allocated 128 MB of memory . As the Worker continues to execute that memory remains allocated, even during network IO requests.

> For example, when a Worker executes via a scheduled event , it executes for four seconds, including network-bound IO time: 4s x 0.125GB (or 128Mb) = .5 GB-s.

There is also a pricing page that's more detailed [2].

[1]: https://developers.cloudflare.com/workers/platform/limits/

[2]: https://developers.cloudflare.com/workers/platform/pricing/

Re: DigitalOcean Functions: A powerful serverless computing solution

#65
post #2

Ado from DO here. Happy to help in anyway I can. Super excited for DO Functions to finally go GA!

Will any sort of scheduled execution be possible with DO Functions? I've been looking for a way to add scheduled tasks (e.g. session cleanup) to DOAP apps.

yep - it's coming.

Re: DigitalOcean Functions: A powerful serverless computing solution

#66
post #2

Ado from DO here. Happy to help in anyway I can. Super excited for DO Functions to finally go GA!

"Memory is limited from 128 MB - 1 MB, defaulting to 256 MB", do you mean 1GB? 5 second max function duration? Cloudflare is unlimited and AWS is 15 minutes. https://docs.digitalocean.com/products/functions/details/lim...

Currently it is a 5 second max duration, but we are working on addressing this.

Re: DigitalOcean Functions: A powerful serverless computing solution

#67
Finally! DO were seriously lagging behind some competitors in the "small, easier, cheaper than the big3" space. Scaleway have had serverless functions and containers ( which is even better because even easier to migrate across providers), message queue for a couple of years now?

Congrats on the work anyways, and let's hope they put out a Container as a Service soon too.

Re: DigitalOcean Functions: A powerful serverless computing solution

#68

Waiting for a standardized approach to serverless that lets us just write the code once and deploy to _any_ cloud provider. Right now, all of these products (aws, azure, do, etc) seem to have, at least, slight differences that would make it not possible to switch to another provider without some code changes.

It’s been around for years https://www.serverless.com/framework/docs/providers

Re: DigitalOcean Functions: A powerful serverless computing solution

#69

Digital Ocean is great for spammers because Digital Ocean does not care to be a good internet citizen. Being a good internet citizen would be too expensive, so DO just throws up its hands and does nothing about its spamming customers.

Uhm, you just sounded like an add for DO here: "DO won't randomly shut down your account because they guess you might be doing something fishy like spamming" ...and don't tell me you don't get "spam" from AWS users. Only GCP is doing more policing, but as a dev I'd be wary of using them of fear of being labeled "suspicious" because some weirder scraping usage patterns or whatever.

The subject here is Digital Ocean. Yes, I get spam from seemingly all providers. However, AWS takes action and DO does not. DO will simply pass my complaint on to the spammer and my problem becomes worse.

I've setup a rule to simply drop mail from DO IP addresses, no legit mail ever comes from DO.

Sending a spam complaint to DO will do nothing more than verify to spammers that you are a good target.

If DO wants a better reputation then they can earn one.

Post reply on HN