I have quite some Uplink code that my app requires to function properly. I want it to be up 24/7, so I can’t just run it on my local machine. I also don’t want to move it to the app’s server code, because then I run into performance issues due to its size and imports. I can’t afford the Business plan yet for enabling persistent server modules, and moving imports into function calls only gets me so far in terms of performance optimization (still have to run an expensive import statement every time I call the function that needs it), plus it feels wrong.
I’m interested in recommendations for easy and free or affordable hosting options for my python Uplink code. Unfortunately, pythonanywhre doesn’t do the trick.
Surely I’m not the only one with this requirement. What are other people using?
Google Compute engine has a free tier, you still give them your credit card, but when running one of the lowest combination of linux VM/CPU/ram 24/7 the discounts actually add up to $0.00 a month.
A raspberry Pi costs about $40. Can run 24/7 at home. You can remote into in using VNC from your local network, or SSH into it. If you forwarded an SSH port through your router you can use an SSH tunnel. If you wanted to securely access it from anywhere using a terminal program like putty, with VNC and an SSH tunnel you can even remotely and securely control the GUI.
Edit: Oh I forgot to mention your IP address, use something like duckdns.org on your pi to make sure you can still get to your IP address from anywhere in the world.
For my Uplink code, I’ve dedicated a 12-core machine here. A single core easily handles our current compute loads, so it’ll be awhile before I need anything more.
Currently, bringing the PC down for updates is very quick. Should even that delay become intolerable, I have several alternate machines in the area, that can load-share (or completely take over whenever I update the main one).
To deal with power issues, every machine has a sizeable battery backup.
To deal with Microsoft-induced Patch Tuesday reboots, I will be using AlwaysUp, which runs my Uplink code (and any related programs) as Windows services.
My uplinks execute long running Excel, CAD or other software scripts that require the user to be signed in and have a GUI, don’t work on Windows server and can’t have 2 concurrent sessions on the same machine.
So I have 3 2-core Windows VMs running my uplinks. 3 machines are enough for now, but I can add more machines in a few minutes by cloning one of them and changing just a few settings.
They are configured to login the user at reboot and run as the signed in user. Unfortunately you can only do that by creating an user without password, so our IT guy worked to isolate them and make sure they are not a vulnerability for our network.
Having 3 of them allows me to go to one of them, close the uplink windows, do whatever updates I need and restart the uplinks. Then I can send some requests and if something goes wrong, I can shut the uplinks down again. It allows me to use one machine to test the updates while the other two manage the production load.
I have a monitor app that shows what machines does what. If I see only 2 working machines and some jobs on the queue, I know that one of the 3 machines has a problem and I can investigate.
I never heard about this… I will look it up!!!
I run all of my uplink code on Digital Ocean (free $100 intro offer DigitalOcean – The developer cloud)
and Linode (also with a free $100 intro offer)
Beyond their free intro offers, they start at $5/month which is pretty cheap. I use loads of them in production (50+)
As to whether they suit your purposes, only you can evaluate that.
Hi, @stefano.menci . Just added what I hope is a helpful link…
Just wondering, becuase I use Digital ocean too but i currently use droplets. Should I explore Kubernetes or their ‘apps’ option as alternatives?
I use droplets, too. I have most of my software installed by scripts I’ve built and it’s a pretty smooth process so I’ve not been compelled to stray into other territories.
I don’t use docker because I just haven’t taken the time to understand it properly. My one brief encounter ended with me turning purple trying to get the thing to connect to the outside world, and I’ve never tried since.
Apps look interesting, but again there’s no compelling reason for me to change how I do things at this time so I’ve never really looked to deeply at them.
well, i apprecite you letting me know. If its good enough for you, Its good enough for me. I’ll stick with droplets…