r/Backend • • Oct 02 '26

Your database might not be slow. Your code might just be bullying it.

0 Upvotes

I saw this pattern way too often:

An endpoint feels slow →
someone checks the DB →
“Database is the bottleneck.” →
add an index →
still slow.

So they add caching.

Still slow.

Then they start talking about read replicas, sharding, connection pooling…

Meanwhile the application is quietly doing something like:

1 request → 47 database queries

Nothing is technically “broken.”

Each query takes 3–5ms.

The problem is that you're doing it over and over again.

And this gets even uglier when those queries are happening sequentially.

So now I'm curious:

What's the highest number of DB queries you've seen behind a single API request in a real project?

And where do you draw the line?

At what point do you stop optimizing individual queries and start asking:

“Why the hell am I making this many queries in the first place?”

I’m genuinely curious what other backend engineers have run into.


r/Backend • • Mar 08 '26

Not so sure AI will replace us that quickly

Post image
2 Upvotes

r/Backend • • Jan 13 '26

How to get a job at OnlyFans as backend developer?

0 Upvotes

I’m a backend developer in my final year of college. I’ve already been placed, but as many of my friends are getting offers from MAANG companies, I started looking at the growth opportunities there, which seem significantly better than in most other companies. Could someone please guide me on how I should target this company there career page isn't working and how I can secure an interview?


r/Backend • • Mar 01 '26

Open AI Interview Question — 2026 (With Solution)

8 Upvotes

I have a habit I’m not sure if it is healthy.

Whenever I find a real interview question from a company I admire, I sit down and actually attempt it. No preparation and peeking at solutions first. Just me, a blank Excalidraw canvas or paper, and a timer.

This weekend, I got my hands on a system design question that reportedly came from an OpenAI onsite round:

Think Google Colab or like Replit. Now design it from scratch in front of a senior engineer.

Here’s what I thought through, in the order I thought it. No hindsight edits and no polished retrospective, just the actual process.

Press enter or click to view image in full size

My first instinct was to start drawing. Browser → Server → Database. Done.

I stopped myself.

The question says multi-tenant and isolated. Those two words are load-bearing. Before I draw a single box, I need to know what isolated actually means to the interviewer.

So I will ask:

“When you say isolated, are we talking process isolation, network isolation, or full VM-level isolation? Who are our users , are they trusted developers, or anonymous members of the public?”

The answer changes everything.
If it’s trusted internal developers, a containerized solution is probably fine. If it’s random internet users who might paste rm -rf / into a cell, you need something much heavier.

For this exercise, I assumed the harder version: Untrusted users running arbitrary code at scale. OpenAI would build for that.

We can write down requirements before touching the architecture. This always feels slow. It never is.

Functional (the WHAT**):**

  • A user opens a browser, gets a code editor and a terminal

  • They write code, hit Run, and see output stream back in near real-time

  • Their files persist across sessions

  • Multiple users can be active simultaneously without affecting each other

Non-Functional (the HOW WELL**):**

  • Security first. One user must not be able to read another user’s files, exhaust shared CPU, or escape their environment

  • Low latency. The gap between hitting Run and seeing first output should feel instant , sub-second ideally

  • Scale. This isn’t a toy. Think thousands of concurrent sessions across dozens of compute nodes

One constraint I flagged explicitly: cold start time. Nobody wants to wait 8 seconds for their environment to spin up. That constraint would drive a major design decision later.

Here’s where I spent the most time, because I knew it was the crux:

How do you actually isolate user code?

Two options. Let me think through both out loud.

Option A: Containers (Docker)

Fast, cheap and easy to manage and each user gets their own container with resource limits.

The problem: Containers share the host OS kernel. They’re isolated at the process level, not the hardware level. A sufficiently motivated attacker or even a buggy Python library can potentially exploit a kernel vulnerability and break out of the container.

For running my own team’s Jupyter notebooks? Containers are fine. For running code from random people on the internet? That’s a gamble I wouldn’t take.

Option B: MicroVMs (Firecracker, Kata Containers)

Each user session runs inside a lightweight virtual machine. Full hardware-level isolation. The guest kernel is completely separate from the host.

AWS Lambda uses Firecracker under the hood for exactly this reason. It boots in under 125 milliseconds and uses a fraction of the memory of a full VM.

The trade-off? More overhead than containers.
But for untrusted code? Non-negotiable.

I will go with MicroVMs.

And once I made that call, the rest of the architecture started to fall into place.

Press enter or click to view image in full size

With MicroVMs as the isolation primitive, here’s how I assembled the full picture:

Control Plane (the Brain)

This layer manages everything without ever touching user code.

  • Workspace Service: Stores metadata. Which user has which workspace. What image they’re using (Python 3.11? CUDA 12?). Persisted in a database.

  • Session Manager / Orchestrator: Tracks whether a workspace is active, idle, or suspended. Enforces quotas (free tier gets 2 CPU cores, 4GB RAM).

  • Scheduler / Capacity Manager: When a user requests a session, this finds a Compute Node with headroom and places the MicroVM there. Thinks about GPU allocation too.

  • Policy Engine: Default-deny network egress. Signed images only. No root access.

Data Plane (Where Code Actually Runs)

Each Compute Node runs a collection of MicroVM sandboxes.

Inside each sandbox:

  • User Code Execution — plain Python, R, whatever runtime the workspace requested

  • Runtime Agent — a small sidecar process that handles command execution, log streaming, and file I/O on behalf of the user

  • Resource Controls — cgroups cap CPU and memory so no single session hogs the node

Getting Output Back to the Browser

This was the part I initially underestimated.

Output streaming sounds simple. It isn’t.

The Runtime Agent inside the MicroVM captures stdout and stderr and feeds it into a Streaming Gateway — a service sitting between the data plane and the browser. The key detail here: the gateway handles backpressure. If the user’s browser is slow (bad wifi, tiny tab), it buffers rather than flooding the connection or dropping data.

The browser holds a WebSocket to the Streaming Gateway. Code goes in via WebSocket commands. Output comes back the same way. Near real-time. No polling.

Storage

Two layers:

  • Object Store (S3-equivalent): Versioned files — notebooks, datasets, checkpoints. Durable and cheap.

  • Block Storage / Network Volumes: Ephemeral state during execution. Overlay filesystems mount on top of the base image so changes don’t corrupt the shared image.

If they asks: You mentioned cold start latency as a constraint. How do you handle it?”

This is where warm pools come in.

The naive solution: when a user requests a session, spin up a MicroVM from scratch. Firecracker boots fast, but it’s still 200–500ms plus image loading. At peak load with thousands of concurrent requests, this compounds badly.

The real solution: Maintain a pool of pre-warmed, idle MicroVMs on every Compute Node.

When a user hits “Run,” they get assigned an already-booted VM instantly. When they go idle, the VM is snapshotted, its state is saved to block storage and returned to the pool for the next user.

AWS Lambda runs this exact pattern. It’s not novel. But explaining why it works and when to use it is what separates a good answer from a great one.

Closing

I can close with a deliberate walkthrough of the security model, because for a company whose product runs code, security isn’t a footnote, it’s the whole thing.

  • Network Isolation: Default-deny egress. Proxied access only to approved endpoints.

  • Identity Isolation: Short-lived tokens per session. No persistent credentials inside the sandbox.

  • OS Hardening: Read-only root filesystem. seccomp profiles block dangerous syscalls.

  • Resource Controls: cgroups for CPU and memory. Hard time limits on session duration.

  • Supply Chain Security: Only signed, verified base images. No pulling arbitrary Docker images from the internet.

Question Source: Open AI Question


r/Backend • • Oct 02 '25

I made a tool for small businesses to generate a brand logo

Post image
0 Upvotes

Hey All

I've been working on building an AI-powered logo generator for small businesses, and I finally launched it today!

New users get 2 credits for free to try it out.

What it does

- Creates logos in minutes using AI

- Multiple variations per generation

- Downloadable PNG files

The problem I'm solving

I wanted to build an app that creates logos at an affordable price for solopreneurs and small businesses.

How it works

-Answer a few questions about your business

- Choose from different styles (modern, vintage, playful, etc.)

- Pick color palettes( optional)

- Get 4 logo variations per generation

- Commercial use included

I'd like to get your feedback!


r/Backend • • Aug 26 '25

Using a backend as a service when you already know backend, waste of money or pragmatic?

0 Upvotes

I’ve been building backends the “normal” way for years, Postgres, auth flows, queues, observability, the whole deal. It’s part of my job at a climate tech startup and honestly I enjoy the puzzle of stitching those pieces together.

But lately I’ve been prototyping a few side projects and I keep bumping into the same thought: is it dumb to outsource what I already know how to do?

Specifically, I’ve been experimenting with Gadget. For context: it gives you a real Postgres DB, built-in auth, auto-generated GraphQL + REST APIs, etc. You can still write custom backend logic in TS/JS, but a lot of the boilerplate is just… gone. Things that would normally take me hours get wired in automatically.

On one hand, part of me feels like I’m just paying for skills I already have. On the other hand, the time saved is huge. I’m shipping prototypes in days instead of weeks. For example:

  • Spun up a journaling assistant with auth + OpenAI integration in a weekend. Normally that’d be a slog of user models, token refresh, rate limits, queue workers.

  • Built an internal dashboard at work that needed queues + background jobs. Gadget handled retries + job visibility out of the box.

So I’m curious what this sub thinks. If you can build all of this yourself, but a tool abstracts 80% of the plumbing, is it a waste of money? Or is that just pragmatic, spend the cycles where they actually differentiate your product?

Would love to hear from other backend devs, especially those who have made the tradeoff one way or the other.


r/Backend • • Mar 02 '26

Experienced devs: What still frustrates you about AI coding tools in large codebases?

0 Upvotes

Hey everyone,

I’m trying to understand real-world developer pain (not hype). For those working on medium-to-large production codebases:

  1. What still frustrates you about tools like Copilot / Claude / Cursor when working across multiple files?

  2. Do you fully trust AI-generated refactors in real projects? Why or why not?

  3. Have you experienced hidden issues caused by AI suggestions that only showed up later?

  4. Does AI actually reduce your review time — or increase it? 5.What’s the hardest part of maintaining a large repo that AI still doesn’t handle well?

Not looking for hot takes — just practical experience from people maintaining real systems.

Thanks.


r/Backend • • Feb 25 '25

State-of-the-art AI tool for Backend Developers

Post image
1 Upvotes

r/Backend • • Nov 26 '25

ULID - the ONLY identifier you should use?

Thumbnail
youtube.com
0 Upvotes

r/Backend • • Aug 02 '26

Which stack has a better job market for a Junior developer today: NestJS or Spring Boot?

0 Upvotes

I have basic programming knowledge in Python, but now I want to start diving deeper into a specific stack and build several projects with it. I am looking at these options:

Spring Boot + React/Angular
NestJS + React/Angular

Evaluating the current market, which of these ecosystems do you think has more open positions for entry-level profiles?

Any other stack recommendations or advice regarding the job market would be highly appreciated!


r/Backend • • Oct 04 '26

Everyone is obsessed with trillion-parameter models, so I mapped out the entire AI spectrum from 100KB to 2.5TB (and what they actually cost to run)

0 Upvotes

Right now, the AI space feels entirely focused on massive datacenter clusters and renting H100s by the hour. But after spending way too much time looking at the actual footprint of these models, I realized that 90% of use cases are completely over engineered.

You don’t always need a multi GPU setup. The AI ecosystem is actually a massive spectrum.

I recently sat down and mapped out the exact tiers of AI models based on their size, the hardware needed to run them, and the point of diminishing returns.

Here are the two extremes and the sweet spot in the middle:

  • The 100KB Extreme (TinyML) (Tensorflow Lite , sensor anamoly detection models): We are talking models that run on microcontrollers drawing single-digit milliwatts. They run on kilohertz processors using ultra-quantized integer math. You can run basic sensor anomaly detection or wake-word detection on a device powered by a coin cell battery.

  • The Local Sweet Spot (4GB to 40GB) (Mistral 7B, Gemma 2 9B/27B, Qwen 2.5 14B/32B): This is where the magic happens for most devs right now. You can run highly capable 7B to 35B parameter models (like Llama 3 or Qwen) at 4-bit quantization on a standard Mac or a consumer GPU (like an RTX 3060 or 4090). It’s perfect for local RAG, coding assistance, and uncensored chat. VRAM is your only real bottleneck here.

  • The 2.5TB Behemoths (Deepseek, Llama , Kimi k3): State of the art massive Mixture of Experts (MoE) routing. To even load these, you need dedicated power infrastructure and server racks of specialized accelerators drawing thousands of watts.

The missing piece: Figuring out the exact math for your hardware

The hardest part about building right now is looking at a model on Hugging Face and trying to calculate exactly how much VRAM you need, what quantization to use, and whether your CPU/GPU will choke on the context window.

So, I wrote a complete deep dive breaking down the math for all tiers of the AI spectrum.

If you want to see the architectural differences at each scale, and a cheat sheet for matching the right model size to your specific hardware, I put the full breakdown on my blog here:

https://cloudmash.blog/posts/ai-model-size-memory-hardware-guide/

Let me know what you guys think especially if you've found any ultra efficient small models/technique that punch above their weight on consumer hardware. And also I would love to hear whether quantization have resulted in major difference in quality , like if anyone have that kind of experience in that.

EDIT: Hello everyone, taking advice from your comments, I have added new model examples and kept old ones as they fit in the already assigned tiers, for reference , year of launch is added alongside the model.


r/Backend • • Nov 21 '25

I need Full stack Technical Founders for startups

1 Upvotes

My founder friends are looking for tech people. If anyone interested, please DM.

Founder 1: Building events/networking platform for professionals. Has the vision, some early validation. Needs full-stack dev cofounder (~20% equity, full-time, remote).

Founder 2: Building business management SaaS for SMBs. Needs someone technical who can ship workflows fast. Python/AI-ML is a plus. Cofounder equity split, full-time.

Founder 3: Gaming startup in Minecraft ecosystem. Has the gaming/business side figured out. Desperately needs CTO who understands Unity 3D, game servers, scaling. 10% equity, full-time, remote.

Let me know if anyone interested. Thanks


r/Backend • • Jul 25 '25

I'm ASP.net developer from egypt

0 Upvotes

how can i find remote internship


r/Backend • • Jan 20 '24

I can't get a job, i know C#, Go, Js, Python and configure servers on linux.

0 Upvotes

My actual salary is 200$ per month, i work 8hs. Idk if i have to make my CV less technical


r/Backend • • Mar 10 '26

At what point does microservices complexity stop being worth it?

0 Upvotes

I’ve been seeing a pattern across a few backend teams lately.

A lot of systems start relatively simple, but fairly quickly move to microservices because it feels like the “correct” architecture. Separate services, separate repos, independent deployments, etc.

In theory this gives flexibility and scaling advantages.

In practice, a few years later, the system often ends up with:

  • dozens of services

  • complex service dependencies

  • duplicated data models

  • difficult debugging across boundaries

  • a lot of operational overhead

At that point teams start introducing more governance, shared contracts, stricter standards… basically trying to restore the consistency that existed earlier.

So I’m curious how other teams think about this trade-off.

When do microservices actually become worth the complexity?

Is it mainly about team size?
Traffic scale?
Organizational boundaries?

Or do you think many backend systems would simply be better off as a modular monolith for longer than we usually allow?


r/Backend • • Oct 04 '26

SYSTEM DESIGN

20 Upvotes

I’m going to share my experience and what I’ve learned about System Design over the years, one post every day. 🚀

Sharing what I know, what I’m learning, and practical insights along the way.

Let’s learn and grow together. ✌️

#SystemDesign #SoftwareEngineering #LearningInPublic #BackendDevelopment


r/Backend • • Jul 26 '26

Need a roadmap to become a Good Backend Engineer depending upon skills i have done yet

6 Upvotes

I am Pradeep Chauhan an Aspiring Backend Engineer looking for the guidance from experienced backend devs.

I have given the resume below since it tells the most things about me: Resume PDF

It's been a few months since I left my previous company and i am still unemployed figuring out what to choose next. Now i have chosen backend engineer.

I need a structured roadmap from preparing, learning, projects and then applying to jobs.


r/Backend • • Apr 21 '26

Quit my retail job to build this. 126 devs found it in the first week.

0 Upvotes

I quit my retail job 2 weeks ago to go all in on this

Built a CLI that sets up a complete Auth system in one command .JWT with refresh rotation,Redis token storage,RBAC,Google and github oauth, typescript and express all preconfigured and env generated automatically

Npx create-authenik8-app

I didn't make a big deal about it.just shipped it and kept on building and testing 126 developers found and cloned it through GitHub alone in the first week

Now I actually want to know what you think.if you try it tell me what's broken,what's missing. And what would make you reach out for this in a real project

The feedback is worth more than stars right now

github.com/COD434/create-authenik8-app


r/Backend • • Apr 04 '26

I need backend developer job

8 Upvotes

Hi everyone,

I’m a currently looking for remote opportunities as a Backend Developer

I have strong hands-on experience in building scalable backend systems and working with modern technologies:

• Programming: Python, Java, C# • Spring Boot, .NET, REST APIs, Microservices

I’m worked as a Software Architect at Learnova(startup), • Designed and implemented microservice-based architecture

I also completed a 1.5-year intensive software development program at Step IT Academy, where I gained a strong foundation in OOP, algorithms, and system design.

I’m passionate about backend development, distributed systems, and building reliable APIs.

At the moment, I’m also looking for remote work and stable internet access to continue improving and contributing.

If you know of any opportunities or can offer guidance, I would greatly appreciate it.

Thank you!


r/Backend • • Apr 11 '26

Help me choose tech stack for 80k-100k users - Ed platform with RAG chatbot

0 Upvotes

Hey Guys,
Please help me choose tech stack, queue service and

  1. Cost effective

  2. Standard practice

Features:

  1. AI Doubt Solver (chapter-wise, RAG-based)

  2. Chapter Dashboard (AI + MCQ + Key Points + Progress)

  3. Key Points / Quick Revision

  4. MCQ Practice (~300 per chapter)

  5. Wrong Question Retry

  6. Basic Progress Tracking

Practice & Testing:
7. Basic Chapter Test (MCQ + short questions)
8. Pre-built Question Bank (no random AI generation)

Guidance:
9. Daily Suggested Task (simple, not full timetable)
10. Saved Doubts / History

Enhancement:
11. Contextual Video Recommendation (mapped to topics, shown at right moments)
12. Exam Importance Indicator (High / Medium / Low — based on trends, no % prediction)

Monetization:
13. Free vs Paid limits
14. Smart Paywall timing

What I am thinking:
Mobile
Flutter - in app purchase
Frontend
React JS
Backend Stack
DB - PostgreSQL
Vector DB - Chroma DB
Node JS - Express
RAG - Python Fast API
Caching - Redis
Queue Service - BullMQ
Horizontal scaling - Kubernetes with docker


r/Backend • • Dec 30 '25

Backend engineers: what’s the first thing you refactor when inheriting a messy codebase?

1 Upvotes

I’ve noticed patterns repeat: • logging • boundaries • config / env handling • database access

Curious what experienced engineers touch first — and why.


r/Backend • • Mar 10 '26

8 Use Cases of Redis Beyond Key Value Store

Thumbnail
sushantdhiman.dev
1 Upvotes

r/Backend • • Jan 31 '26

is IT industry going to collapse

0 Upvotes

guyz! whats your take on this


r/Backend • • Jan 11 '26

How Does the Internet Actually Work?

Post image
2 Upvotes

From your device → router → ISP → CDN → server (and back)

We use the internet every day, but very few people understand what really happens when you open Google or watch a YouTube video.

I’ve published a simple, visual, and technical breakdown that explains:

• How your device talks to the router
• What NAT, private IP, and public IP actually mean
• How traffic moves inside an ISP network
• Why CDNs exist and how they make websites faster
• The real path of a request from LAN → ISP → Internet → Server

I’ve also added a clear step-by-step diagram to make the flow easy to understand — no buzzwords, no confusion.

📖 Read the full article here:
👉 https://devscribe.app/techtalks/how-internet-connection-works-router-isp-cdn/