8 ms·
DigitalOcean Functions: A powerful serverless computing solution
- bengale 4y agoDO's lack of SQS type offering seems even more strange with a product like that. What are people using to plug this gap?
- Mo3 4y agoFunctions aren't necessarily always used in these kind of overarching structures. React frameworks like next.js use them to simply provide backend endpoints for data and logic. I think that's what they're going for, as an addition to their app platform more than anything else Given the max execution time of 5s and the max memory of 1GB, it seems like that is exactly what this is. Some endpoints to fetch e.g. data off the database or some processing tasks for a frontend framework, like the functions Vercel or Netlify offer. Nothing to build serious architectures with.
- adoxyz 4y agoAdo from DO here. Happy to help in anyway I can. Super excited for DO Functions to finally go GA!
- killingtime74 4y ago"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/limits/ https://docs.digitalocean.com/products/functions/details/lim...
- malfist 4y ago5 second max duration seems incredibly small. Is there a reasoning behind this limit?
- Hamuko 4y agoYeah, it doesn't seem super usable for anything that might have to deal with external resources that you cannot control, such as databases or HTTP APIs.
- slig 4y agoHi! Plans for Node16 and more RAM?
- rabbah 4y agoYep and yep, also more runtimes.
- BigglesZX 4y agoWill 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.
- rabbah 4y agoyep - it's coming.
- BigglesZX 4y agoThanks! While I've got you here... do you have any insight into the Spaces roadmap? I've been waiting for per-Space permissions for access keys to land to enable me to migrate a bunch of S3 buckets. Thanks again.
- rabbah 4y agoFiner grained IAM like permissions but without the AWS complexity is of great interest. I will see what else I can share.
- BigglesZX 4y agoThank you – I'm desperate to even just isolate access to a single space, to replicate what I currently have on S3, so I can multi-tenant my clients' media storage on the Spaces platform.
- cc-f31535adfaf 4y agoWhat is the underlying software used for DO functions? OpenFaas? Firecracker? gvisor? something custom to DO?
- SkyAndSand 4y agoI'd be more that interested in that as well because I couldn't find any info about the stack in the docs.
- rabbah 4y agoThe foundation is Apache OpenWhisk https://github.com/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.
- SkyAndSand 4y agoSo that means that there is a vendor lock in and I can't just move over to say IBM Cloud Functions (despite both being based on OpenWhisk)?
- rabbah 4y agoOpenWhisk functions are vendor agnostic and have a generic signature of JSON in and JSON out and no other dependencies. Functions on DigitalOcean may also run functions from Netlify and AWS Lambda (and vice versa). You can run the same functions on IBM Cloud Functions and Adobe I/O runtime. This article from 2020 runs the same code on multiple clouds included self hosted for the curious https://openwhisk.blog/post/advocate/openwhisk-portable-serverless https://openwhisk.blog/post/advocate/openwhisk-portable-serv....
- SkyAndSand 4y agoAny plans for supporting ruby as well? It seems that there is an OpenWhisk runtime for that.
- 8K832d7tNmiQ 4y agoIs it possible to connect to my droplet locally without going through the public ip ?
- deleted 4y ago[deleted]
- pabl0rg 4y agoI’ve been looking forward to this since the nimbella acq, but now I feel betrayed by the new pricing and probably won’t even try it.
- rabbah 4y agoSorry to hear that, I welcome a chance to understand this feedback further.
- tylerritchie 4y agoI'd guess this is a difference in usage based vs per-user pricing, but that's wild speculation
- pigtailgirl 4y ago-- "Serverless Business Unit at DigitalOcean" -- i see a lot of "enterprise lingo" around digital ocean these days - are they still the best "individual developer focused" provider? --
- erikrothoff 4y agoLooking at their ever increasing pricing, no, I wouldn't say so. Linode is so far staying true to their promise of individual developer focused cloud.
- StevePerkins 4y agoWelllllllll... don't forget that Linode had grown very stagnant, and had no desire to cut prices, until DigitalOcean came along and forced the issue. Once DO showed up, Linode suddenly had to produce nice tooling and $5/mo VM's. I don't think that would have happened otherwise, and I'd be really surprised if Linode doesn't follow DO's price increases within a few months. Not really saying this as a DigitalOcean evangelist or anything. It's just that business is business.
- erikrothoff 4y agoAbsolutely agree! Never put a company on a pedestal! But IIRC Linode has had a long history of decreasing prices by adding better specs to existing plans, not sure how that will change with their acquisition. Just keep in mind to build portable apps and avoid lock in.
- abdouls 4y agoYeah, seems like they changed a lot recently (since they're on NYSE). I feel like they are transitioning away from the "for developers" cloud, to more like a "to be" Heorku or AWS/Azure/GCP cloud.
- 015a 4y agoI'd say Yeah. I use and pay for their Apps platform for a few personal projects. Its cheap (like $5/mo/app). It reminds me enough of Heroku that I'm happy. The built-in CI is kind of slow. But it just works and requires relatively low configuration, especially when compared to AWS/GCP/Azure. There are simpler, more specialized products, but I think DO strikes a really good balance. For example, I've hosted static sites on Cloudflare Pages, which is a solid product, but its also rather unconfigureable; I was running into issues with their built-in CI even using a static site generator which wasn't on their supported list.
- JohnHaugeland 4y agoWhy would anyone tie themselves to digital ocean Single infrastructure code dies and the author can't usually save it Ask a heroku fan how they're feeling right now before moving forward with any single host approach
- theshrike79 4y agoIn the real world you kinda need to pick a provider. Having all your code platform agnostic isn't really a viable option unless you've got budget to spare.
- JohnHaugeland 4y ago> Having all your code platform agnostic isn't really a viable option Of course it is
- dghlsakjg 4y agoI’m not an infra person by any means, but isn’t that what containers are for?
- runako 4y agoObviously there are tradeoffs involved in using containers. But aside from that, they also don't typically get you platform independence by themselves unless you also choose not to use any other cloud features (e.g. object storage, queues, IaaS, "serverless" features like DO Functions or Lambdas, key management services, IAM-type services, etc.). In my experience, it's building for the cloud as a platform vs targeting a pre-cloud infra that ties you to a particular cloud. You can obviously DIY all of that in your own containers, but then you're making a choice to invest in infra instead of buying it.
- ceejayoz 4y ago> Ask a heroku fan how they're feeling right now before moving forward with any single host approach Just fine? Fly.io has a fairly seamless automated migration at https://fly.io/launch/heroku https://fly.io/launch/heroku ; my Heroku apps are quite portable. https://www.digitalocean.com/community/conceptual_articles/how-to-write-a-serverless-function https://www.digitalocean.com/community/conceptual_articles/h... shows a pretty similar approach to Lambda - they just invoke a function with a handler. You could run the same handler on AWS Lambda or Cloudfront's workers, probably without any changes.
- bcjordan 4y agoHow long are cold starts with these functions? How long does it take to deploy an update? Are updates rolling/zero-downtime?
- rabbah 4y agoFunctions through app platform are fully managed and deployed with zero downtime and offer roll backs as well. Deployments from the CLI are fast enough you can enable watch-mode and continuously deploy as you code in your IDE. Cold starts depend on runtime and size of the function and an area of continuous improvement (for all cloud providers).
- hasa 4y agoNew way to get vendor locked architecture?
- rabbah 4y agoThe code for the functions is vendor agnostic. Vendor lock-in comes from the integrations the code that runs in the cloud ends up consuming, and the developer experience one acquires. The nature of cloud development is that one invariably becomes an expert in a cloud or stack, and that's the real lock in / why it's expensive to move in practice.
- kennethh 4y agoAWS x86 Price $0.0000166667 for every GB-second $0.20 per 1M requests Arm Price $0.0000133334 for every GB-second $0.20 per 1M requests DO $0.0000185/GB-second So basically a little higher price for each GB/s but no cost pr request. AWS free tier provides 400,000 GB-s and 1 million free requests per month DO free tier 90,000GB-seconds of usage for free per month So cheaper in some respects compared to AWS. Google and Azure is roughly the same as AWS. Also DO include egress which is expensive on AWS (it does not say it cost anything).
- gagan2020 4y agoBut then why would I shift to DO. Not much delta to encourage shift. Even individual developer wouldn't find it compelling.
- mrloba 4y agoWhat are the main differences to aws lambda? Will you be transparent about how it works, such as when a function is frozen? This is something I miss with many Aws services
- rabbah 4y agoI shared a few details above - with the implementation backed by a mature open source project, there are lots of details available already. Thanks for bringing this up though so we can focus on the parts of interest to the community as we roll out more technical documents on the product.
- annoyingnoob 4y agoDigital 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.
- catchclose8919 4y agoUhm, 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.
- annoyingnoob 4y agoThe 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.
- catchclose8919 4y agoShrug. So anyway, since most of us use 3rd party services to send emails, using DO is perfectly fine. Whatever. (And if the extra profit they get from hosting spammers results in slightly lower prices for me then I'm glad to profit. It's about sending spam, not firing missiles or dropping bombs. Again, whatever.)
- annoyingnoob 4y ago> (And if the extra profit they get from hosting spammers results in slightly lower prices for me then I'm glad to profit. It's about sending spam, not firing missiles or dropping bombs. Again, whatever.) Its fine if you want to watch the world burn for your own benefit. Not all of us do care to see that. You should take a look at Verizon's 2022 Data Breach Investigation Report. https://www.verizon.com/business/resources/reports/dbir/2022-dbir-executive-summary.pdfx https://www.verizon.com/business/resources/reports/dbir/2022... https://www.verizon.com/business/resources/reports/dbir/2022-dbir-infographic.pdf https://www.verizon.com/business/resources/reports/dbir/2022... "82% of breaches involved a human element" "66% of breaches involved Phishing, Stolen credentials and/or Ransomware." So glad to hear that you want to support Business Email Compromise. https://www.fbi.gov/scams-and-safety/common-scams-and-crimes/business-email-compromise https://www.fbi.gov/scams-and-safety/common-scams-and-crimes... We'll see how much you shrug when it happens to you.
- l30n4da5 4y agoWaiting 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.
- killingtime74 4y agoIt’s been around for years https://www.serverless.com/framework/docs/providers https://www.serverless.com/framework/docs/providers
- debacle 4y agoI am a DO customer despite the cost being a little higher for my purposes than AWS. I like their UI, their email reminders, their pricing transparency, and their support. I switched to DO from Linode a long time back for something that was relatively minor in hindsight, but I've never not been happy with the change.
- norman784 4y agoI 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?
- my69thaccount 4y ago1. It's trendy 2. It locks you in to a certain vendor 3. It costs more
- lf-non 4y agoThe lock-in part is increasingly untrue. Esp. if you are on gcloud, your functions are not tied to their infra at all. Eg. For nodejs you are just writing express middlewares with no real gcloud infra dependency. You can also use their build packs to run and test the functions locally. gcloud serverless infra is also built on knative so if you have teams with k8s familiarity you can run them on in-house infrastructure. For AWS lambda I believe it was initially true, but now I believe they also support running arbitrary containers. The costs more part is very much subject to nature of use case. If you have a lot of small services that are invoked once in a while you can benefit from serverless pricing.
- lf-non 4y agoWith traditional server you keep your webserver running all the time and keep paying for the underlying infrastructure whether irrespective of actual usage. You can still spawn more instances/containers on demand and autoscale but you need to think about provisioning and how that affects your cost. With serverless the costing maps directly to usage and scaling is (ostensibly) taken care of for you. If you have long running workloads that anyways need preallocated infrastructure and forward planning, you likely don't gain much from serverless. If your work can be split into smaller units of executions that can be invoked on-the-fly independently, you will likely benefit from serverless pricing.
- NateEag 4y agoTo a certain extent, serverless actually delivers on the "No sysadmins required" promise that EC2 doesn't really enable (someone still has to manage your EC2 herd's configuration, even if you call that person a "devops engineer").
- bongobingo1 4y agoI wish DO would open a datacenter in Oceania.
- deleted 4y ago[deleted]
- sofixa 4y agoFinally! 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.
- deleted 4y ago[deleted]
- ChrisArchitect 4y agoA handful of firms now doing this, same sort of serverless/workers thing, makes me hesitant to be bullish on certain players like CF, Netlify, Vercel, whatever other sort of 'up n comers'. If they're all offering it, the value of one over another goes down drasically. Yeah yeah, vendor lock in, it's fine, people have options and will stay where they want, but some of the big value propositions from these firms over the last year or so has been heavily focused on this aspect of the service feels like. Is it just a case of 'there's lots of business to go around' maybe?
- rabbah 4y agoServerless computing is the future of cloud computing with more and more infrastructure management shifted to the provider rather than internal infra and ops teams. It isn't to say it's all or nothing, and it is a long enduring transition which is why the DigitalOcean integration between Functions and App Platform is differentiated related to some of the other vendors you mention. You don't have to choose between serverfull (containers, servers, kubernetes even) and serverless -- functions, and entirely managed services like CDNs, load balancers, containers that scale from 0 to N, SSL cert management, automatic build and deploys, rollbacks, API gateways, object storage ... and managed serverless key-value stores and databases. So functions is really table stakes for a cloud, as are events, scheduled and background functions. You've seen this play out with every cloud provider since the arrival of AWS Lambda. Our goal is to make it scale, make it cheap, and make it secure with DigitalOcean developer simplicity and so you are right, a corner stone of this endeavor is the developer experience and integration with cloud services because a cloud application consumes all of these services. As these become core competencies for a cloud, the integrations between all the services only get better and deliver more value to the customer.
- pqvst 4y agoThe maximum execution duration of 5 seconds seems incredibly short! The only time I've used "cloud functions" in the past has been for executing complex jobs that may take up to several minutes. For this, cloud functions has been very useful and easy to scale. I hope DO can consider increasing this limit.
- anony23 4y agoIs this not quite expensive?