js13kGames / js13kserver

js13kGames Server category files and rules
86 stars 33 forks source link

Heroku's free tier is dead - where do we go? #19

Open alcore opened 1 year ago

alcore commented 1 year ago

The current rules for the Server category still define Heroku as the service we expect Server games to live on. With its free tier dead, that's no longer an option (not to mention that past Server games in the compo are effectively "dead" currently, and need to be revived somehow).

The next edition of js13kGames is up in 2 months, so those rules need to be revised.

We need to...

And if we settle on multiple, then this begs the question whether to simply allow people to host them wherever they want, merely providing guidance on the options they have. I don't see why we couldn't/shouldn't, though I recall @end3r mentioning "validation reasons" for why Heroku was mandatory. Still, I don't see how we can reliably guarantee that someone's server continously runs the same code that was submitted to the competition initially, so let's not try not to make this obvious issue a blocker.

In any case, we need that decision no later than mid-July to leave some headroom.


I've done some preliminary googling and narrowed down my personal alternative picks to:

Additional options suggested in this thread that are viable:

There's more options out there, of course. All of these seem appropriate at first glance, and have roughly the same operating model on their free tier as Heroku had (i.e. the instance spins down after an extended period of inactivity, and then takes a while to spin back up on-demand). However, I've used none of them in practice and have limited time in the next 2 months to actually try them out properly.

Input on host experiences from folks who run small, low-traffic (with occasional spikes) Node.js apps would be very welcome.

end3r commented 1 year ago

I believe we had a more formal partnership with Heroku which precluded other choices in the past?

Actually no, it was picked just because it was the easiest to manage and "top 1 choice for the job" at the time, Heroku never officially partnered with the competition in any way.

I'd be good with "run it wherever you want", but ideally we'd have an option to validate if an entry is not breaking any rules. We definitely should be able to check if someone is cheating or not.

alcore commented 1 year ago

I'd be good with "run it wherever you want", but ideally we'd have an option to validate if an entry is not breaking any rules. We definitely should be able to check if someone is cheating or not.

Agreed, but realistically we can only check the submitted code. Even if we had access to the actual servers, we can't monitor them 24/7 to see if they're truly still running that initial code. And asking for such access already feels both inappropriate and cumbersome --- and that's assuming the host even supports the notion of "teams" or "shared access" on a free tier.

To me this feels like something where we'd need to simply show some good faith.

Schnark commented 1 year ago
* [Cyclic](https://www.cyclic.sh)

Cyclic does not support websockets, which are required by the server.

alcore commented 1 year ago

Cyclic does not support websockets, which are required by the server.

Good catch, thank you. I caught the "full stack apps" from the top of Cyclic's homepage, but not the "full stack serverless apps" from its bottom, and didn't dig in into docs.

Schnark commented 1 year ago

I just tested Render with my submission from 2022, and it works without any changes: https://yellow-and-blue.onrender.com/ Deploying is as straight forward as with Heroku. I did not test the database, since my game did not use it. But as far as I can tell this is a good replacement.

benallfree commented 1 year ago

I think https://fly.io might be another good option. They have a strong free tier and with a Dockerfile added to this repo, contestants would be able to deploy there pretty easily.

If you'd like me to submit a PR for this, I'd be happy to do so.

alcore commented 1 year ago

@Schnark - thank you again, and noted.

@benallfree - if we go with allowing everybody to "host it wherever you feel like", then defining prereqs via a Dockerfile could become troublesome. I.e. to support the repo's approach to sandboxing, that container would need to potentially pre-install both MySQL (or a MySQL-like DB - in which case: which?), or PostgreSQL, and run both - draining resources.

My take on this whole issue is: the less hands on we go with this, the better. If someone decides they want to use Fly.io, and it's their first ride with Docker, then Fly's docs seem simple enough. Plus, there's a dedicated Node getting started guide.

Ironically, if I understand the docs right, containers on Fly are on ephemeral storage only and one needs to attach a volume manually to get stable storage (or configure LiteFS), meaning in turn our default fallback to SQLite would not work as expected. In my book that's all the more reason to go hands off on this.

That said, in terms of resource allowances, Fly.io is certainly an additional option that we could point to for free hosting.


As a general update: We're leaving this issue open for roughly 3 more weeks to gather more options and feedback. Currently it's leaning towards "Allow hosting wherever, but provide pointers to some free hosting options and guides in the README".

hpx7 commented 1 year ago

Hey we are long time fans of js13kGames at Hathora and we think Hathora would be a good option for gamejam participants as well. The deployment experience with Hathora is similar to that of Heroku and Fly.io (single command deployment, all you need is a Dockerfile) but we are optimized for gaming specifically.

We also provide a $500 credit on signup so the service should be effectively free for js13kGames participants. Docs available here: https://hathora.dev/docs

olvr commented 1 year ago

I have also tested my submission from last year with Render: https://deathmatchdungeon.onrender.com/

It works without any changes and the process of deploying from GitHub is exactly the same as it was with Heroku so it was trivially easy to do.

I didn't use a database either so can't comment on that but overall Render appears to be the closest to a direct replacement for Heroku that I have seen.

Fly.io requires a credit card even to take advantage of the free allowance which, on top of the less straightforward deployment, might be enough to put people off. I haven't tried it.

end3r commented 11 months ago

The competition starts very soon, so we need to make a decision - @tricsi what do you think? What approach will be the easiest to implement here?

geeknik commented 11 months ago

https://vercel.com/pricing has a pretty generous "hobby" tier for free users and they support 35 different frameworks. Deploying from GitHub is easy. https://supabase.com/pricing has a really generous free tier as well. These 2 services can be talking to one another in less than 2 minutes of signing up.