frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Do you still run Redis and workers just for background jobs?

2•sergF•5h ago
Hi HN,

I'm working on small SaaS projects and keep running into the same issue: background jobs require a lot of infrastructure. Even for simple things like delayed tasks or scheduled jobs I end up running Redis, queue workers, cron, retries, monitoring, etc. For bigger systems this makes sense, but for small apps it feels like too much.

I'm thinking about building a small service that would let you send a job via API and get an HTTP callback when it's time to run, without running your own queue or workers. Basically: no Redis, no workers, no cron, no queue server

Would something like this actually be useful, or am I trying to solve a problem that isn't really there?

Comments

figassis•4h ago
Use Go, it has built in go routines and likely libraries that let you implement your own workers.

If you’re running a single instance, you don’t even need any synchronization. If you’re running multiple instances of your app, try implementing locking (this actually works in any language, not just go. Go jsut helps with the multiple long running workers part. With other languages, just run multiple instances.

Process:

1. Each worker can startup with their own id, it can be a random uuid.

2. When you need to create a task, add it to the tasks table, do nothing else and exit.

3. Each worker running on some loop or cron, would set a lock on a subset of the tasks. Like:

update tasks set workerId = myUUID, lockUntil = now() +10minutes where (workerId is null or lockUntil < now()) and completed = false

Or you can do a select for update or w/e helps you keep other workers from setting their ids at the same time.

4. When this is done, pull all tasks assigned to your worker, execute, then clear the lock, and set to completed.

5. If your worker crashes, another will be able to pick it up after the lock expires.

No redis, no additional libraries, still distributed

sergF•3h ago
Yeah, this is pretty much what I end up doing as well.

It works, but I keep rewriting the same task table / locking / retry logic in every project, which is why I'm wondering if it makes sense to move this out into a separate service.

Not sure if it's actually a real problem or just my workflow though.

figassis•3h ago
I would create a library, make some logic more generic, create a generic table (task id, taskType, workerId, etc), store task metadata as jsonb so it can be pulled and marshalled into typed data by users.

Import it into your projects.

Make the library work standalone. But also build a task manager service that people can deploy if they want to run it outside their code.

Then offer a hosted solution that does the webhooks.

I’m sure someone will want to pay for it.

sergF•3h ago
That makes sense, and this is actually close to what I keep ending up with in different projects.

I usually start with something simple, then add a task table, then locking, retries, then some kind of worker process, and eventually it turns into a small job system anyway.

At some point it starts feeling like I'm rebuilding the same queue/worker setup over and over, which is why I'm wondering if this should live outside the app entirely.

Thanks, this discussion is really helpful.

robertandrewp•1h ago
One approach that sidesteps the whole problem: design for fully synchronous, stateless requests from the start so there's nothing to queue.

I did this for a financial calculator API — every request is pure computation, inputs in, result out, nothing persisted. No Redis, no workers, no task table, no locking. The response is ready before a user would notice a queue anyway (sub-50ms).

Obviously only works when tasks complete in milliseconds. But figassis's pattern of "starts simple, then incrementally grows into a small job system anyway" often happens because the initial scope could have been fully synchronous — the async complexity creeps in before it's actually needed.

Worth asking first: does this task genuinely have to be async, or is it just easier to model it that way?

sergF•1h ago
Yeah, that makes sense too. I also try to keep things synchronous as long as possible.

In practice async usually shows up once there are external APIs, retries, scheduling, or anything that shouldn't block the request, and that's where I end up building some kind of job system again.

I'm trying to figure out if that point happens often enough to justify moving this outside the app entirely.

Ask HN: Remember Fidonet?

72•ukkare•3h ago•50 comments

Ask HN: What Happened to xAI?

4•zof3•42m ago•3 comments

Ask HN: What Are You Working On? (March 2026)

277•david927•1d ago•1041 comments

The Architecture of an Exit Scam: A Technical Audit of Zszrun

3•cappyfjao•2h ago•0 comments

Ask HN: Let's rethink the architecture and future of Emacs

2•kurouna•27m ago•1 comments

Ask HN: Since a week HN keeps logging me off every few days, why?

5•epolanski•3h ago•0 comments

Ask HN: What AI content automation stack are you using in 2026?

2•jackcofounder•4h ago•2 comments

Ask HN: How to be alone?

661•sillysaurusx•2d ago•545 comments

Ask HN: Do you still run Redis and workers just for background jobs?

2•sergF•5h ago•6 comments

Ask HN: Can I repurpose a Bluetooth voice remote as input device for a PC?

15•albert_e•2d ago•20 comments

Ask HN: Please restrict new accounts from posting

699•Oras•1d ago•493 comments

Ask HN: Most beautiful personal blog UI you have ever seen?

132•ms7892•1d ago•53 comments

Why is GPT-5.4 obsessed with Goblins?

9•pants2•9h ago•5 comments

Why is email so resilient as a technology?

5•noemit•3h ago•4 comments

Tell HN: I'm 60 years old. Claude Code has re-ignited a passion

1063•shannoncc•3d ago•968 comments

Ask HN: Is GitHub getting less reliable, or is it just me?

7•_pdp_•16h ago•5 comments

Ask HN: Favorite Non-Spammy iPhone Games?

3•bix6•12h ago•3 comments

Ask HN: What game engine would you recommend for vibe coding?

5•general_reveal•12h ago•4 comments

Ask HN: Read‑only LLM tool for email triage and knowledge extraction?

2•maille•14h ago•3 comments

Ask HN: Any informed guesses on the actual size/architecture of GPT-5.4 etc.?

4•dsrtslnd23•14h ago•0 comments

Code-review-graph: persistent code graph that cuts Claude Code token usage

2•tirthkanani•19h ago•0 comments

Ask HN: Who Needs Help?

14•surprisetalk•22h ago•9 comments

A job ad for Agentic AI Advocate

4•greenpinia•23h ago•1 comments

Ask HN: Are showlang and thelang HN endpoints not being maintained?

4•freakynit•1d ago•1 comments

Ask HN: Which book are you reading these days?

6•chistev•17h ago•18 comments

OpenAI might end up on the right side of history

12•shoman3003•1d ago•10 comments

Ask HN: Anyone else feel this community has changed recently?

56•kypro•3d ago•29 comments

Ask HN: How are you handling persistent memory across local Ollama sessions

5•null-phnix•2d ago•0 comments

All tmux sessions as a single terminal

2•lygten•1d ago•1 comments

I replaced my freelance SaaS stack with 5 single-file HTML tools

5•AnnSri•1d ago•2 comments