Rehosting my websites
programming
llm
meta
Python
Re-hosting my websites from a dedicated provider to my own VPS.
Overview
Default Test Site
Hosted Static Site
Simple Flask Site
Rehosting mynl.com
old.mynl.com
On GitHub pages
- blog.mynl.com
Rehosting convexrisk.com
Rehosting salaryrank.com
Redirect to website on home machine
DNS entries
See DNS post.
Software / General Notes
Gunicorn
- What: A WSGI (Web Server Gateway Interface) HTTP server (sync by default).
- Use when: You’re running Flask/Django (WSGI) and don’t need WebSockets.
- Scale: multiple worker processes (
-w N
), optional async workers (gevent
,gthread
). - Note: Not for Windows—run it on your Linux VPS (perfect there).
Uvicorn
- What: An ASGI server (async-first).
- Use when: You’re running FastAPI/Starlette/Quart or need WebSockets/long-lived connections.
- Scale: built-in
--workers
or run under Gunicorn with the ASGI worker.
Easiest choice for you
- Staying on Flask (WSGI) → use Gunicorn on the VPS.
- Moving to FastAPI / need WebSockets → use Uvicorn (or Gunicorn + uvicorn workers).
What “sync vs async” really means
- Sync (WSGI): one request per worker at a time. Great for quick REST/HTML apps, mostly short requests. Scales by more processes. For CPU-bound (heavy math): both need multiple processes (and/or offload work to workers/queues); async doesn’t speed CPU work by itself.
- Async (ASGI): a worker can juggle many I/O-bound requests (DB, HTTP calls, websockets) concurrently. Scales well for real-time and streaming. For I/O-bound (DB/HTTP waits): ASGI can handle many concurrent clients per core.