Ask

Rewriting a Python ingest service, Go or Rust when nobody on the team has shipped either?

Before you pick a language, work out where the four boxes are going. Ingest and write to Postgres is an I/O shaped workload, and if your Python is spending its time waiting on the network and the database, a rewrite in anything compiled buys you far less than you expect. Profile it for an afternoon first.

In my case the honest answer turned out to be that we were spending most of our CPU in JSON deserialisation and in building one INSERT per row. Swapping the JSON library and moving to batched writes cut our box count enough that the rewrite got deferred by a year. If yours is genuinely CPU bound in parsing then Go will help a lot and Rust would help slightly more, but find out which world you are in before you spend six weeks.

194 · in/go-dev ·

What was the career change you regretted, and how many months in did you know

Careful with the regret stories in threads like this, including mine, because you are hearing from whoever feels strongly this week. I moved from finance to analytics and month four was awful, month eight was fine, year two was clearly better than the alternative. If I had posted at month four you would be reading a warning. Give yourself a fixed review date twelve months out and refuse to evaluate it before then.

58 · in/career-moves ·

first request each morning takes 1.1s and the rest 60ms, is that just cold start

Normal, and there are usually two separate sleeping things rather than one. Measure before you touch anything:

const t0 = performance.now()
// ... your handler
res.headers.set('Server-Timing', `db;dur=${tDb}, handler;dur=${tAll}`)

plus a module-scope const boot = Date.now() you log once, so you can tell a cold instance from a warm one.

Then force a cold one and read the split:

  • most of the second is before your code runs: that is runtime and bundle init, and the fix is a smaller server bundle or paying for a warm instance.
  • most of it is the first database call: your database is probably scaling to zero and waking up, which on managed Postgres with auto-suspend is commonly 500ms to a second. Turning off auto-suspend or picking a plan that stays warm fixes that half.

Guessing between those two costs a weekend. Measuring costs ten minutes.

137 · in/cold-starts ·

FWD hatch on proper winters or AWD crossover on all seasons, which one gets up my street?

I bought the AWD and kept the all seasons on it, exactly the trade you are considering. Felt invincible for about six weeks. Then I came down a gentle slope toward a stop sign at maybe twenty five, touched the brakes, and slid through the junction into the kerb hard enough to bend a control arm and a wheel. The repair was several times what a set of winters on steels would have cost, and my premium went up for three years on top. I have run winters on everything since.

107 · in/winter-driving ·

Enqueue inside the database transaction or after commit, where do you put it?

The race you described is real and faster than people expect. I instrumented ours after chasing exactly this bug: our workers were picking jobs off Redis in single digit milliseconds, and the transaction that created the row took a good deal longer than that under load because of a trigger nobody remembered writing. So the job genuinely arrived before the data existed, hundreds of times a day, and every one of those became a not-found in the logs that we had learned to ignore. The gap is not theoretical, and it gets worse under exactly the load where you least want mysterious failures.

158 · in/queues-and-jobs ·

cloudflare workers or a $7 vps for an api at 45 req/s and p95 under 300ms

Disagreeing on the on-call part. The $7 VPS is cheap in dollars and not cheap in attention: unattended upgrades, a firewall, log rotation before the disk fills, TLS renewal you will find out has broken on a Sunday, and a deploy story you build yourself. None of it is hard, all of it is yours forever, and the failure mode is you being the only person who knows how it is wired.

Workers deletes that entire column for about $40/month. Whether $40 is worth it depends on what an hour of your time is worth and how much you enjoy sysadmin work. For me it stopped being worth it the second time I debugged a full disk at midnight.

176 · in/cold-starts ·

docker container or a throwaway vm for agent shell commands, solo dev, 200 runs a day

MicroVM services are genuinely good and the boot times are in the low hundreds of milliseconds, so it is not the performance argument people expect. The reason I would not start there as a solo dev is that it puts a network hop and somebody else's API between you and your own test suite, and the debugging story when a run behaves differently in there is worse than the problem you were solving. Reach for it when you have untrusted input, which is a real line and you will know when you cross it.

64 · in/agents-and-mcp ·