Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alcore opened this issue Jun 14, 2023 · 11 comments
Open

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

alcore opened this issue Jun 14, 2023 · 11 comments

Comments

@alcore
Copy link
Member

alcore commented Jun 14, 2023

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...

  • Decide which host to move to. At the very least we need one new host that's free with sufficient resources for our typical games to run, and that's as easy to set up as Heroku used to be;
  • Decide whether we stick to one host as in the past, or allow several;

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:

  • Render
  • Cyclic (is actually akin to serverless, not persistent, e.g. does not support websockets)
  • Railway (free tier actually has insufficient monthly allowance to run an entire month)
  • Glitch (lacks external DBs, but appears to support SQLite just fine, which should be sufficient)

Additional options suggested in this thread that are viable:

  • Fly.io (sufficient allowances; some caveats WRT getting databases running)

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
Copy link
Member

end3r commented Jun 14, 2023

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
Copy link
Member Author

alcore commented Jun 14, 2023

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
Copy link

Schnark commented Jun 15, 2023

* [Cyclic](https://www.cyclic.sh)

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

@alcore
Copy link
Member Author

alcore commented Jun 15, 2023

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
Copy link

Schnark commented Jun 16, 2023

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
Copy link

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
Copy link
Member Author

alcore commented Jun 24, 2023

@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
Copy link

hpx7 commented Jun 27, 2023

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
Copy link

olvr commented Jul 14, 2023

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
Copy link
Member

end3r commented Aug 10, 2023

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
Copy link

geeknik commented Aug 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants