I’m building a personal project in Linux and I’m currently running my python script as a background task. Basically “python start.py &” What is the correct way to run this service? As a Linux service? And I’m building out a pipeline to lint, test, deploy. How do I do the deployment to EC2? Have the ec2 instance pull and run the python code? Then start it as a background program?
AWS Lambda
It needs to be fast
Lambda is quick but use case may not fit what you need.
Ec2 - run it with a daemonizer such as supervisord or monit. Otherwise run it as ecs (container) or run as app engine (google). Use free tier if you dont expect much, or get a droplet from digitialocean for $5 a month.
Will monit add latency? This is a very low lag application so I don’t want to use an containerization like Docker
How does deployment work with monit?
GCP
Docker + supervisord as Oscar mentioned
Can’t use Docker because it needs to be low lag. Is supervisord better than monit?
Read this before you decide docker is not feasible: https://stackoverflow.com/questions/21889053/what-is-the-runtime-performance-cost-of-a-docker-container Haven't used monit, so don't know. In any case, definitely don't use AWS Lambda if you care about latency.
Omg folks. Systemd. Why making your lives complicated - it’s THE way to run services on Linux. https://github.com/torfsen/python-systemd-tutorial/blob/master/README.md Also, you might want to proxy that with Nginx.
Ibm cloud utilizing red hat.
And built on top of the horrible openstack shit!!