Not my domain of expertise, but cheating and lags in online real-time games (like FPS games) can ruin a game quickly. Also, in-game shops, currency, micro-transactions probably are targets for crackers and exploiters.
To make a safe website, stop wanting to do everything yourself. Use a webhost that doesn't give you SSH access, or a service like Netlify.
Edit: from the comments it's clear that OP didn't actually hardcode the connection string.
Also, I would look to configure all components to fail loudly, so that if something wouldn't connect to Redid, my server just wouldn't launch.
I'm not trying to say that I'm better or smarter than OP: I've actually tried learning bioinformatics, but dropped out of uni 14 years ago, realising that my brain is just not created for anything biology-related. Rather my point is, many of these problems (and problems I've seen junior developers struggling with) are not some arcane knowledge that you should just learn by heart (like all of those awful genus names in Latin, or all the enzymes in the dreadful ATP scheme that I still have nightmares of sometimes), but a logical extension of more basic and universal principles that actually make total sense once you think about them.
> Also, I would look to configure all components to fail loudly, so that if something wouldn't connect to Redid, my server just wouldn't launch.
In this case though the OP did not have control over the redis connection handling it was through a dependency that silently timed out.
1. A few years ago, I probably would have made the mistake of actually hard-coding my connection strings, usernames and passwords. I'm pretty sure I did that on my first ever webapp, cause I didn't know any better. So, not defending my intelligence, or taking any offense at your statement. 2. But... That's not what's happened here. I'm setting the redis url inside Heroku's "Config Vars" section, and then reading it in with Django's `env()` functionality, as is appropriate. But the url has seemingly been changed from underneath me, for a reason I still don't fully understand.
Side-note: I used to be under the impression that CS was "harder" than biology, and that anyone who understood CS could pick up biology at will, if they decided. Turns out that's not the case, haha.
Is the Redis add-on attached to the Heroku instance? This is how Heroku knows which instances' environment variables need updating when rotating credentials.
Setting up https, or online payments, etc. is actually quite simple. People with engineering or scientific background have most likely faced much more complex tasks. Security and safety aspects can be more stringent in many other industries, including in software development.
The difficulty of the web, I think, is the proliferation of standards (or not so standards) and technologies: networking, https and friends, APIs (payments, etc), html, css, javascript, php, ruby, java, aws, react, vue, redis, SQL, etc. And they are all evolving independently all the time. This is a right mess and can be overwhelming.
I don't know how to explain it, exactly, but worrying about this definitely made development more difficult, even when initially setting up and testing out.