r/Backend • • 4h ago

Building a backend-as-a-service on TiDB instead of Postgres (like Supabase): does the case hold up?

3 Upvotes

I work on a backend-as-a-service and we're weighing TiDB as the core database instead of Postgres, which Supabase is built on. I'd like to hear from people who've run TiDB in production.

Why TiDB appeals to us:
Writes scale horizontally without hand-sharding
TiFlash runs analytics on live data, so no separate warehouse
MySQL compatibility, so existing drivers and ORMs work
Resource control for isolating noisy tenants

Where I'm unsure:
Supabase leans on Postgres features like row-level security, LISTEN/NOTIFY for realtime, and extensions like PostGIS. As far as I can tell TiDB has no RLS, so auth rules would live in our API layer.
Latency on small transactions versus a single Postgres node
Cost and overhead for lots of small tenants

Has anyone built multi-tenant SaaS on TiDB? Where did it beat Postgres, and where did it hurt?


r/Backend • • 20h ago

Rate Limiting Explained: Token Bucket vs Leaky Bucket vs Sliding Window

Thumbnail
javarevisited.substack.com
16 Upvotes

r/Backend • • 20h ago

How do you properly handle exceptions in a layered backend architecture?

15 Upvotes

I'm learning backend development using FastAPI, PyMySQL, and MySQL. I'm struggling to understand where to catch, raise, and propagate exceptions across my database, repository, service, and router layers.

For example, how should I handle unexpected database connection loss or server shutdown? Which layer should handle it, and which exceptions should each layer be responsible for?

I've been using ChatGPT to learn, but whenever I ask about standards and best practices, it keeps changing its recommended implementation. It's become difficult to distinguish established practices from architectural preferences.

I'd appreciate insights from experienced backend developers on how you handle exceptions in production, the reasoning behind your decisions, and reliable learning resources.

I want to understand the engineering principles rather than simply copy working code.


r/Backend • • 16h ago

What took 190 µs out of this Django-Bolt request?

2 Upvotes

I measured CPU per request on one endpoint returning 10 PostgreSQL rows as JSON. With Django-Bolt 0.13.0 it took 416 µs. Recording the SQL at startup brought that down to 226 µs. The endpoint still hit PostgreSQL on every request. Same response bytes, one process, one laptop in Docker.

I maintain quickset, the add-on I measured. Both paths are in make bench-released. Has anyone profiled query construction separately from database time on a similarly small endpoint? I used AI to help build quickset and edit this post. https://github.com/YasserShkeir/quickset


r/Backend • • 19h ago

I benchmarked the 4 Laravel Octane servers (PAM, FrankenPHP, Swoole, RoadRunner) on the same app, here's what the numbers actually show

2 Upvotes

context first: I maintain PAM, a PHP app server, and I'm proposing it as a driver for Laravel Octane. Before opening that conversation I wanted evidence that I could reproduce, not just "trust me it's fast". So I built a benchmark repo where all four Octane servers serve the exact same Laravel app.

First thing was correctness, not speed. I ran Octane's own test suite with the PAM integration: 238 tests, 195 pass, 0 fail, 43 skipped (they're Swoole-only and there's no swoole extension on PAM's PHP). Then I swapped Octane's FakeClient for one that pushes every request/response through the PAM client too and compares status, body and cookies with what Laravel produced. 112 exchanges, 0 mismatches. Octane's own CI on that commit is green too (21 test jobs, PHP 8.2 to 8.5, Laravel 12 and 13).

Throughput: I used wrk on 4 endpoints (hello, json, db, view) and took the median of 5 rounds, rotating the server order each round. PAM had the highest median rps on every endpoint, 7.2% (db) to 13.9% (hello) above FrankenPHP, 26 to 36% above Swoole and 70 to 77% above RoadRunner. On hello, for example, it was 11,191 vs 9,826 vs 8,310 vs 6,323.

but ngl the latency part is less clean, and I think is more interesting. FrankenPHP is steadier, its p99 stays within ~1.6 ms across rounds on every endpoint. PAM's p99 jumps around more between rounds (7.46 to 13.94 ms on hello). On db, FrankenPHP's median p99 (12.77 ms) beats PAM's (14.48 ms), and Swoole has the lowest db p99 of all (10.27 ms). PAM's median p99 is the lowest on hello, json and view. So "fastest" kinda depends of what you're measuring.

What went wrong: the machine was noisy. It never stayed idle for 5 minutes within 3 hours, so the run started at a load of 4 and during the run the load sat at 12 to 17 instead of 10 to 12 like the previous run. All servers ran under the same conditions, but tbh I'd treat the numbers as relative only, on that machine. The load log is in the repo.

The part I'm happiest with is the post-boot zygote. Instead of booting Laravel in every worker, PAM can boot the app once and fork workers from it, so they share that memory copy-on-write. On Octane's PAM worker with 8 workers, spawn to ready goes from 226 ms (pre-boot) to 2 ms, and SIGHUP reload from 285 ms to 222 ms. Memory (sum of PSS, 8 workers): 200 MiB post-boot vs 233 pre-boot, FrankenPHP 316, Swoole 307, RoadRunner 594. Cold start is about the same in both modes, since the zygote still boots the app once and then forks.

There's also zero-loss reload/recycling under load, the 504 request timeout and upload memory in there. Every number links to the raw output, and please run it on your own hardware, I'm curious if the p99 variance shows up for you too.

https://github.com/push-in/octane-benchmarks


r/Backend • • 1d ago

If I want to increase my skills, how much of the code should I be writing myself during this process?

10 Upvotes

I differentiate finishing my work tasks, which is simply more convenient to do using llms, and learning in my spare time to grow my skills. I want to reach the level of senior backend engineers, and want to understand how to go about this process.

Does mastering the basics go so much better when writing code myself? Or have the times and workflows changed so much that is better to learn "natively" with AI assistance from the get go?

Also, any tips for improving your skills in general are welcome.


r/Backend • • 1d ago

New Freelancer Struggling to Gain Clients' Trust – Need Advice!

6 Upvotes

I'm a web developer, and I've made around 150 cold calls so far, out of which I've managed to book only 5 client meetings.

One of the most common objections I receive is:

"You don't have enough experience. You're new to this field."

I'm getting this feedback from multiple potential clients, and I'm not sure how to handle it.

What should I do to overcome this objection and build trust with potential clients?

I'd really appreciate advice from experienced freelancers, web developers, or business owners who have faced a similar situation.

Any tips or suggestions would be helpful!


r/Backend • • 1d ago

MERN vs Python Full Stack in 2027 – Which is better for a fresher in India?

0 Upvotes

Hey everyone!

I'm a third-year CSE student primarily interested in Backend engineering and confused about choosing between MERN Full Stack and Python Full Stack for a free 3-month training programme that also provides placement assistance.

My current skills:

\- Strong fundamentals in Python and JavaScript.

\- Familiar with React.js.

\- Basic knowledge of MERN, but not in-depth.

\- 1-month internship experience, mainly with PHP and JavaScript.

\- 15+ open-source PRs merged/closed. (Worked with typescript)

My primary goal is to become a Backend Developer / Software Engineer.

Initially, I was leaning towards MERN because of my JavaScript and React experience. However, Python is also one of my stronger languages, and I'm wondering which stack currently offers better opportunities for freshers in India.

I'd love to hear from experienced developers:

  1. Which has better fresher hiring opportunities: MERN or Python Full Stack?
  2. Is Python (Django/FastAPI) a better choice for backend-focused roles?
  3. Considering my existing skills, which would you recommend for getting my first developer job in the next 3–6 months?

Looking for practical advice based on actual industry and hiring experience, not just language preferences.

Thanks!


r/Backend • • 1d ago

Test Local Apps on a Real Phone Over Cellular Data

Thumbnail instawormhole.com
1 Upvotes

r/Backend • • 1d ago

Standardising AI coding across my team.... we now auto merge 90% of changes while code quality and compliance holds.

Thumbnail
reddit.com
0 Upvotes

r/Backend • • 1d ago

Need guidance switching from Automation QA to Developer

Thumbnail reddit.com
1 Upvotes

r/Backend • • 2d ago

What does it mean to be a good backend developer?

18 Upvotes

A thought crossed my mind. What makes a backend developer "good"? Is it the language of choice? The amount of technologies he/she knows?

Please share your thoughts on thks


r/Backend • • 1d ago

struggling?...we are here for you

0 Upvotes

Hi! I'm currently offering affordable digital services for students and small businesses.

I can help with:

  • Excel and CSV data cleaning
  • Removing duplicate records and organizing spreadsheets
  • PowerPoint presentation formatting
  • PDF to Excel/Word conversion
  • Basic Python tutoring

If you or someone you know needs help with any of these, feel free to message me. I'll be happy to discuss the requirements and provide a reasonable price.


r/Backend • • 2d ago

Comparing Laravel Go and Arkoren

Thumbnail
arkoren.dev
2 Upvotes

r/Backend • • 2d ago

Need help, I don't like adding ai for my projects

5 Upvotes

So, I am really fascinated with backend. But I just hate adding ai features everywhere. First it demands money (api pricing). Second I don't see any advantages of adding ai to my projects.

so far, I have built my own music store where i sell sample/packs with TS ecosystem, EDA and redis. And I have been building a project that takes up my android phone and puts it as a mountable disk on finder (macOS) thru WebDAV tech wirelessly in pure golang, Kotlin for bypassing mobile restrictions.
Here is the second project stripped down prototype in TS
https://github.com/KhushOS-hub/fileM-Proto
I ran into the bottleneck of TS ecosystem, that made me transition to golang, currently building it in golang.

can you give me some more ideas to build and practice and dive more deep into backend?


r/Backend • • 2d ago

my js is mid and i wanna learn backend. stay on node or go python??

4 Upvotes

ok so i'm a cse student and i can do some frontend with js, but let's be honest, my js fundamentals are NOT it. i can build stuff but i don't fully get what's happening under the hood 😭

now i wanna get into backend and i'm stuck between two paths. either i keep going with js and learn node, express, mongo, the whole mern thing, or i start fresh with python and go for fastapi or django. my brain keeps flipping every day. if i pick node, will my weak js hold me back, or will building backend stuff actually fix my js? and if i go python, am i just throwing away the js i already learned? i'm also really into ai/ml so python feels like the smart move long term, but idk if i'm just overthinking it.


r/Backend • • 2d ago

Things to look for in backend programming

Thumbnail reddit.com
1 Upvotes

Well I am currently in 200lvl and i am studying computer science so this semester we are about to learn backend and i am asking what are the things I should look forward to and some sites I should visit


r/Backend • • 3d ago

View Markdown in the terminal like you’re on GitHub

Post image
49 Upvotes

I look at Markdown files a lot for work and prefer to just stay inside the terminal, so this has been a game changer for my flow.

mddog basically works by drawing Markdown as the way GitHub (or Obsidian) shows it, then sends that page to the terminal as image strips. It’s fully interactive, too, so you can select text, click on buttons, etc.

I'm learning a lot about the terminal, Rust, and the kitty graphics protocol throughout this process and having a lot of fun. If you give it a try, let me know how you like it!

Docs: https://mddog.pages.dev (for the full feature set and other installation methods)

Repo: https://github.com/qu8n/mddog


r/Backend • • 3d ago

Developer is attempting to convince me to go the AI development route

3 Upvotes

I’m on the ground floor of a software start-up. It will be a full business management platform (service and retail POS). A developer offered to do a free MVP. He’s very qualified and experienced in manual coding..,but is fully committed to AI development.

He’s built out the scheduling function in just a few days. I’ve gone through with a fine tooth comb and it’s very well featured and works very cleanly. The developer is very bright, listens well and caught onto the vision and features wish list quickly.

My concern is the condition of the back end. Is it scalable. Can it be replicated not just for our business, but to other businesses I sell to (SaaS).

My understanding is that AI can do great for basic apps, but makes a mess of the back end of very dense, heavily layered program like what I am building. I don’t want to be dependent on this developer forever. I want it to be scalable and transferable to service companies or other developers.


r/Backend • • 3d ago

Data Replication In Distributed Systems | Implement Raft From Scratch

Thumbnail sushantdhiman.dev
2 Upvotes

r/Backend • • 3d ago

Standard server security measures

1 Upvotes

I've recently gotten into fullstack, after constructing an iOS app and looking to expand functionality into The Internet. I don't wish to give details on the project, however it involves large high-sensitivity databases and communication both from an administrator's frontend and the user's iOS app etc.

  • An administrator signs up their organisation and connects an external service (which is given an ID, username and password to identify itself) which then POSTs the data to my server.
  • The app users can access parts of the data belonging to them, but not write.
  • The administrator has a username and password.
  • The app user's credential is linked to their email address, which is present in the database so can be used to determine their identity once verified.
  • The app users do not use the web frontend interface. They interact through the app, which regularly pulls a filtered set of only that user's data to store locally.
  • I'm using NodeJS and SQLite. And yes, I've hashed the passwords properly.

What are the standard security measures that I need incorporate into this type of database project—and then some? E.g, HTTPS, some form of database encryption.

That is to say, what are the industry standard security measures in a web application/server?

Edit: My usage of the word 'administrator' may be misleading. I mean that an organisation looking to use my software would nominate a person to administrate the org.'s usage of the software. Not an administrator within the team maiantaining the software.


r/Backend • • 4d ago

what more i can do

17 Upvotes

as in this AI everyone can buils an basic backend API calling and handing
as i am intrested in backend what different i should do to make my work shown in this field
i am a 2nd year guy figuring out its backend
any ine can give me a roadmap type thing or something i can learn
i have covers the basics express node potgres mongo DB jwt
what else


r/Backend • • 4d ago

What next to do?after sriniously

6 Upvotes

So I have almost completed the course of sriniously back-end playlist and I'm at testing video and now it feels like things are getting over my head because I can't relate to any problem he's describing.

Anyone wondering what this playlist is, so it's a backend specific playlist teaching the backend but concept specific eliminating the framework or language specific things. He teaches almost everything needed in a backend. So I know what api design is and what things to take care of, Authorization, serialisation and such...

But now I need to learn to implement those concepts in real scenarios.

I need to learn any framework and then to implement all the concepts I learnt from the playlist.

I was thinking to learn django framework with postgres as a database. So should I learn django?? From Corey schaffer playlist or follow the book of will vincent.

If I follow Corey he teaches not everything but mostly api design and deployment and additional things. But as I have notes of sriniously's back-end so I'll know things I need to learn or be atleast able to explain it to others.

My final goal is to learn backend for interview and also be able to develop my personal projects which I already have idea of(of the project) I just want to have hands on practice with theory to explain actual concept.

That's it it would be great help if you experienced guys would answer for which way to move.

And also what you guys think of cs50w.

Assume I know python language.(Ofc not everything but basics to work with)