How does Elixir keep going?

I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.

But I don’t use it anymore.

Serverless was the promised land circa… 2015-2017? Then everyone realized it actually kind of sucks.

But now? Seems like CloudFlare actually figured things out. Every new project I make is immediately deployed there as some monstrosity of a javascript app, yet somehow I don’t hate it.

There’s SQL at the edge with D1, Durable Objects for fast collocated state management, KV for cache reads, a very affordable edge compute offer… and more.

So now that serverless is actually good, where does that leave communities like Elixir?

Given that infra and deployment is the only real gotcha with Elixir.

2 Likes

Not everyone wants to deploy a monstrosity of a javascript app and couple it to Cloudflare.

34 Likes

Not everything is a website on the public internet.

14 Likes

Avoiding vendor lock-in is a good one. It would be interesting if an elixir-based system can be shown to be provably less expensive to run at scale too. Not sure if that’s true or not with how things like Cloudflare price.

On a related note, it’d be nice to see an elixir-tailored host that makes clustering dead simple and helps leverage the BEAM. Maybe that’s potions.io? I assume fly.io has abandoned the cause.

5 Likes

If you’re brand new in the field the yes infra and deployment is a gotcha, but that is not language specific, personally I think most of the BEAM and Elixir suffer from not showcasing the real potential of the language.

4 Likes

Some people would call it insanity :lol:

@budgie, are you forgetting half the internet went down last year because they were tied to CloudFlare?

Elixir is a firm favourite with those who want autonomy and reliability :icon_biggrin:

5 Likes

They don’t have to be, it was just a figure of speech due to the AI slop involved.

It just makes the most sense these days. I get vendor lock-in is a problem at scale, but the truth is paying $100/mo with no users is a lot more impactful than paying $100k/mo at scale.

For most early-stage apps, these days I wouldn’t use anything else.

I didn’t even mention their durable workflow engine or queues. They have literally everything you need in one place.

They don’t have to be public.

Vendor lock-in is the only good argument for caution imo. But it’s also typically something that comes up later. For 99% of your apps, the problem isn’t will I be able to afford $1k/mo with 100 paying users. It’s can I justify spending $100/mo with zero paying users.

Potions looks cool, but even so, on 1 vps you’re not fault-tolerant. Not to mention you still likely need a HA postgres setup, and that’s not cheap.

On CF, availability isn’t something you actually need to think about in most cases.

Autonomy yes I get it, but reliability is relative. The internet is unpredictable, and everyone everywhere has downtime.

This is the wrong perspective imo. You don’t have to be a noob to benefit from simplicity. It’s not that it’s a gotcha, it’s just drastically simpler to go with other options, especially when the marketability of what you’re selling is unclear.

If you’re fine paying for a personal project regardless of whether it makes money, that’s fine. But there’s no contesting the value of what you get for $5 from CloudFlare.

I used to be hard in the other direction, but after a while it becomes hard to ignore the benefits.

I payed $5 per month for a vps to which I deployed several personal projects, db included, and I can switch among several vendors painlessly. What do you get for $5 from Cloudflare for your personal projects?

7 Likes

A shitload, tbh. Lot of stuff I probably don’t even know about.

Global edge deployments. DNS utilities. Transactional email sending, but also for receiving and processing emails. Secrets management. Managed HA ACID-compliant database. KV store. Queues and durable multistep workflow execution. Media storage and delivery. Basically free traffic.

I also have zero administrative responsibility for the infra. I could add 15 more apps, serverless endpoints, etc and pay the same thing.

For some apps you could even get away with being on the free tier tbh.

There are many people running commercial apps on the $5/mo plan.

My point is you cannot host on-device or on-prem applications on Cloudflare.

2 Likes

Cool, I don’t need any of those for my personal projects though. My understanding of serverless is they are billed by usage; are you sure the $5 per month come with reasonable usage included? if, so, how much usage are we talking about?

Yeah that’s fair if you need that. I don’t, which is why I’m saying all this.

Yep I’m sure. Each paid workers plan has 10 millions requests included per month and 30 million cpu milliseconds.

Even the free plan has 100k requests per day.

Details here. Workers & Pages Pricing

1 Like

I think there’s a lot to be said for being as independent and not reliant on others as you can - and that circles back nicely to your original question “How does Elixir keep going?” - I’d say for pretty much the same reasons it got off the ground to begin with; it’s incredibly empowering for bootstrappers and small teams.

Look at what Erlang did for WhatsApp - Elixir made that power accessible to the rest of us… and that was over ten years ago. Now, it’s beyond even that, with a whole ecosystem behind it :048:

And do I really need to mention community - the Elixir community is still one of the best around : -)

3 Likes

This is true, but WhatsApp grew up in a completely different world than we live in now. Even AWS was barely a thing in 2009. It’s essentially a legacy codebase now.

That’s not enough for me. Although I don’t have that much real traffic there are bots and bots traffic is significant.

What are you building? Something with financial data?

Cloudflare has the problem of starting all kinds of projects and never finishing them, leaving you to clean up the warts. Just the insanity of discrepancies between workers and pages and the not updated documentation drove me crazy when I used it last.
I’m not anti-Cloudflare, we do use it, and I use it personally, but it’s not as magic as this thread makes it sound.

I don’t think it’s that different. I doubt you could run WhatsApp on AWS in some other language without having deep pockets.

Elixir and Erlang lets you take on gigantic tech - it was true ten years ago and perhaps even truer now, given the cost of dedicated servers has sky-rocketed…

1 Like

What do I run is beside the point. The fact is that my app runs in low end VPS and will cost more to run in CF. Consider the situation of some nasty bots come and overwhelmed my server. With a low end VPS, I see my server is struggling, grep the log, see what is happening, and deploy a hotfix to mitigate. With CF, I don’t even see that coming (because everything chugging along), and got hit by a massive bill at the end of the month. Do you see why I prefer the first situation much more?

1 Like

I beg to differ for the most part. The app was started in an era where it was normal for people to run their own hardware on-prem, without globally distributed apps or customer bases. Before containers really became a thing.

The economics of running software has changed massively. Large capital investment (at least in computation) isn’t really a thing anymore for small businesses in most industries.

Now it’s almost exclusively manageable fixed costs on rented hardware, or exclusively variable costs with serverless.

Obviously if you’re running a large company though, 100% variable cost is a shitty idea because of poor operational leverage.

But for startups with 0-a few customers, it’s great. Also depends on the kind of app for sure. There are some where I’d definitely consider Elixir still.

For the land of SaaS MVPs with few customers, imo serverless (finally) wins.

Fair. Just curious what kind of hobby app you’re running that’d exceed 10 million requests per month, or even 100k per day tbh.

It’d almost need to have some sort of event or data ingest round the clock to reach those numbers. But that’d be one of the apps I probably wouldn’t use CF for.