Free AI servers are dangerously easy to trust. The docs promise zero cost, the setup takes minutes, and your first curl returns a perfect 200. Then your second user shows up, and the server starts answering with 503s or, worse, hangs forever. I've been burned by this pattern enough times that I finally wrote a 30-line load tester to check a free tier before I build anything on it. Here's the script, how to run it, and how to read the numbers without fooling yourself.
The 30-line load tester
The idea is simple: fire a fixed number of concurrent HTTP requests at a health endpoint, record status codes and latencies, and let the results speak. I used asyncio and aiohttp because they handle concurrency without spawning a thread per request, which would skew the test on a small machine.
import asyncio
import time
import aiohttp
async def hit(session, url, results):
start = time.perf_counter()
try:
async with session.get(url) as resp:
await resp.rea
Discussion
Start the conversation
Your voice can be the first to spark an engaging conversation.