I’ve always been curious how Roblox games are deployed and managed. Is each instance of a game executed in a docker container, and the luau code isolated that way or is there some multi-tenant solution?
They run the game servers in Docker. Doing multi-tenant is a weaker security boundary and makes it easier to steal places from other users, which Roblox takes pretty seriously when places represent all the time invested by game studios and millions of dollars in revenue.
How is this cost effective though? There are a lot of low quality games, not by a big studio. These also get a dedicated docker container?
What do you mean? A docker container is just a process. Are you suggesting they run different game servers in the same process?
running multiple game servers in docker is a multi-tenant environment, because docker is not a serious security boundary unless you're applying significant kernel hardening to your kconfig to the tune of grsecurity patches or similar
I haven't used Roblox but Lua has the ability to create sandboxes to run user code. You expose only the functionality you allow to the user code, usually block I/O, and any unsafe functions. https://luau.org/sandbox