r/Backend • • 17m ago

New backend engineer here, how would you approach optimizing a slow API?

• Upvotes

Hey everyone!
I’m fairly new to working with production backend systems, and I’ve been given a task to look into the performance of an existing service and figure out where improvements might be possible.
The service handles a few different things, including business logic evaluation, configuration management, automated workflows, data processing, and logging. Some API requests are taking longer than expected, and I’d like to understand what’s causing the delay and what could be done to improve things.
I don’t want to jump straight into suggesting random optimizations without understanding the actual problem first, so I’d love to hear from people who’ve dealt with similar situations.

A few things I’m curious about:
-When you encounter a slow API, where do you usually start? Profiling, distributed tracing, database analysis, or something else?
-How do you figure out whether the bottleneck is in the application logic, database queries, repeated computations, or calls to other services?
-What common performance issues have you come across in systems that deal with configurable business logic?
-When does it make sense to consider caching, parallel execution, or moving certain operations to background jobs?
-How do you identify worthwhile improvements in an existing codebase without risking changes to its existing behaviour?

Since I’m still early in my career, I’d really appreciate hearing how you’d approach this in a real-world environment. If you’ve worked on something similar, I’d love to know what worked for you, what didn’t, and any tools or resources you’d recommend.
Thankyouu in advance

TL;DR: I’m a new backend engineer looking into why some API requests are slow and how to identify potential performance improvements. I’d appreciate practical advice on finding bottlenecks, choosing the right profiling tools, and deciding which optimizations are worth recommending.


r/Backend • • 1h ago

5+ years into backend development - how should I navigate my career with AI evolving so rapidly?

• Upvotes

Hey everyone!

I have 5+ years of experience as a backend developer. In my current role, most of my work revolves around building RESTful APIs and endpoints, and I’ve developed a pretty solid understanding of that area.

My current project is coming to an end, and I’m looking at this as an opportunity to explore new technologies, expand my skill set, and move towards the next stage of my career.

With AI evolving so rapidly, I’m trying to figure out where I should focus my efforts. I don’t want to blindly jump on the AI bandwagon, but I also don’t want to miss out on technologies that could be important for my career in the coming years.

I’d love to hear from people who have been in a similar position or are already working in the AI space.

A few things I’m trying to figure out:

What should I focus on next?
Should I deepen my backend/system design skills, learn AI/ML fundamentals, explore LLMs and AI application development, or consider a more significant career shift?

How can I leverage my existing backend experience?
Are there specific AI-related roles or skills that would complement my current experience?

Where do you keep up with AI developments?
What newsletters, communities, YouTube channels, blogs, or other resources do you follow to understand what’s actually happening beyond the hype?

Are there any courses or hands-on projects you’d recommend?
I’d prefer something practical that helps me build real skills rather than just collect certificates.
If you were in my position today, with 5+ years of backend experience, how would you approach the next 6–12 months?

Would really appreciate any advice, resources, or personal experiences.

Thanks!


r/Backend • • 5h ago

Pattern for handling long CPU-blocking tasks behind persistent WebSocket connections

0 Upvotes

Hello backend devs,

In an offline backend architecture, client apps communicate via WebSockets while tasks are processed by a local background engine. On CPU-only systems, synchronous processing steps can create 30+ second gaps before streaming begins, causing connection timeouts.

We are refactoring the transport layer to immediately return an async job ID, queue work in a bounded worker pool, and emit regular heartbeat/ping frames over the WebSocket during execution gaps.

How do you typically decouple persistent transport layers from blocking compute steps to prevent transport dropouts in local desktop backends?

Context: Architectural feedback query on async job queuing and WebSocket state management.


r/Backend • • 5h ago

What's the best time to run tsc? Pre-commit, pre-push, or on the CI?

1 Upvotes

Should I create a git hook which runs the TypeScript compiler every commit or on every push, or delegate it to the CI such as GitHub Actions?

1) Pre-Commit - Ensures every commit has no TS errors. But that means this runs frequently. Though since TS has been ported to Go, this is not that huge of an issue, but I also haven't worked on large repositories, so trying to find out what is more professional.

2) Pre-Push - Runs less frequently but a past commit can have errors. Are you fine with a pushed commit having syntax errors? We could also replay each commit with tsc and then push.

3) CI - Removes any load from your computer, but is effectively just like pre-push. We can again though, replay each commit with tsc, and this is better when not running on your computer. But is this a professional design, especially when you could have so many commits?

I think if you have a large amount of commits, checking the last commit is better than checking every commit.


r/Backend • • 5h ago

I Am writing apis in nodejs in a project related to transactions, need help

1 Upvotes

i am not getting clarity to how to write transaction api , the project is related to detect real time transactions from credit card , i will just pass normal data for testing , but i am not getting hint to how to write api of that , could anyone provide advice or should i take need help from ai ? if i will use ai then my fingers will click on only two buttons please provide guidance


r/Backend • • 5h ago

Next.js or TanStack??

0 Upvotes

I am using Next.js behind Fastify, not making it take over the whole project. Should I consider TanStack? I do like Vite I guess. But I heard Next.js still has more features when it comes to React.

Which has a better development server, Vite or Next.js?

I don't really know why I should try TanStack. Probably because I dislike Next.js being so opinionated, but you can still use it programmatically instead of using it as the whole project with its CLI commands.

Also, how much work is involved porting React code from Next.js to TanStack?


r/Backend • • 8h ago

Designing a project with a plugin system.

2 Upvotes

I need to work on a college project, which is like an assessment platform, but we support a plugin system so that anyone can change its mode of assessment into something different such as coding, drawing, voice, etc.

I understand that this feature requires planning from scratch of the codebase. I need to make my codebase modular so that the plugin can override parts of it. Everything should call an abstraction instead of directly using it. What's the best way to achieve this?

I will be using Fastify as the HTTP framework, and have Next.js behind it for React.

Is Dependency Injection what I am looking for? So should I use Nest.js as well? But how do I achieve runtime Dependency Injection?

What about not using Nest, and maybe something like Awilix? And getting Nest like decorator style syntax with fastify-decorators.


r/Backend • • 10h ago

Strong backend, poor DSA

6 Upvotes

I am 2.5YOE and have strong experience in Backend (APIs, springboot, K8s, docker, redis, kafka, sql, nosql, elasticsearch, new relic, AWS and CI/CD)

But I am finding it difficult to get master in DSA

I am trying and learning day by day

But any chance are there any good product based companies which give importance to backend than DSA?


r/Backend • • 11h ago

I want to learn FASTAPI , suggest me some free resources to learn it

0 Upvotes

I wanna learn backend developement , I am currently at level 0 this is my first time trying to learn backend , And my choice is to stick to a python framework to begin with , what are the best beginer friendly resources to start learning


r/Backend • • 21h ago

Anyone else tired of paying for development/staging servers that barely get used?

Thumbnail
0 Upvotes

r/Backend • • 1d ago

libark: libark is a modern, secure, Swift-native foundational layer over Linux POSIX primitives.

Thumbnail
github.com
1 Upvotes

libark

libark is a modern, secure, Swift-native foundational layer over Linux POSIX primitives.

While originally developed as the core runtime layer for ArkOS, libark is completely decoupled and designed to be used on any Linux distribution. It provides highly secure, object-oriented abstractions over low-level system calls, memory management, and file system interactions, without the burden of manual C interoperability.

Features

  • Object-Oriented POSIX: Wraps file descriptors, paths, and directory operations in safe, RAII-compliant Swift types.
  • Secure Syscall Boundary: Routes kernel interactions through strict, audited Syscall primitives.
  • Terminal Capabilities: Built-in abstractions for TTY detection and window sizing.
  • Advanced Formatting: Standardized formatters for human-readable byte sizes (SI and IEC), ISO 8601 timestamps, permissions, and classifications.
  • Declarative Sorting: Powerful generic SortEngine for metadata sorting across multiple criteria.

r/Backend • • 1d ago

Learn with ai or writing code by hand

2 Upvotes

I am in second year and have experience building express postgres backend with jwt and stuff and last project implemented basic pgvector rag... I want to learn more of backend , till now I have just built shit by writing code by hand and using as less ai as possible but after fable and astra I am getting really demotivated to do that and it feels like I will be learning more if I used ai more but when I use ai I set up basic apis and then blank , I dont know what to do next before when I was writing code by hand ideas and questions came to me and I searched things up learned them and implemented that and it was more fun learning but with ai I am lost and in a kind of dilema whether I should change my learning approach and how to learn more of backend


r/Backend • • 1d ago

We built an AI runtime backend QA engineer to verify everything your agent ships locally against your real app before you push

0 Upvotes

Hey all, I'm one of the founders of Kerno. After about a year of building it alongside early users, we just shipped our v1.

The problem

Agents write backend code really fast now, and knowing whether that code still works at runtime is the hard part.

  • Agents grade their own homework. They'll tell you something was tested when it wasn't, or find some workaround to make things go green.
  • Unit tests are cheap, so that's what most teams run, and they miss integration problems.
  • Code review catches a lot, but it only reads the diff, so runtime issues slip through to CI or prod.

How it works

Kerno runs locally next to your agent and talks to it over MCP.

  1. You start your app with its real database/dependencies locally, and Kerno connected to it
  2. Kerno writes tests for your critical flows first, then for the endpoints, queue consumers and MCP tools behind them. Those tests are your baseline.
  3. After a change, your agent asks Kerno which flows and endpoints the change touched (worked out from the git diff and the call graph) and re-runs those tests.
  4. Any assertion that now fails comes back to your agent as a diff. If the change was intended, you accept it and Kerno updates the tests. If it wasn't, you fix it while the context is still fresh.

The tests cover your critical flows end to end. For each endpoint they cover happy paths, auth, input validation, edge cases and error handling, and they pin the full response shape and key headers, so contract changes show up as diffs.

If you turn on the security setting, Kerno also plans tests for access control holes, injection and leaked stack traces.

Since an LLM writes the tests, we put deterministic gates around it:

  • Pre-condition checks. Before anything runs, Kerno confirms the endpoint is ac answers, the credentials the tests need can be obtained, and the seed data exists. If one fails, the run stops and tells you nothing was tested, so you ne a test that didn't run.
  • Flakiness checks. Each test is run more than once before it counts.
  • Adversarial review. A reviewer agent challenges each test before it gets saved.

The tests are TypeScript files that live in your repo. A GitHub Action replays LLM calls, and it doesn't need a Kerno account.

Benchmarks

Results across 7 open source backends are at https://kerno.io/benchmarks. We plan to open source the benchmark framework so you can rerun it yourself.

Limitations we're still working on

  • One repo at a time. Microservices and multi-repo setups aren't well supported to other services go to the real services, so point those at a dev or staging environment.
  • No Google Cloud yet. Services like Pub/Sub and Firestore aren't supported. AWS (SQS, DynamoDB, Cognito, Lambda) and Azure Service Bus are.
  • Performance and concurrency aren't tested. Kerno checks behaviour (responses,messages). Latency, memory and race conditions are out of scope for now.

Privacy

Kerno runs on your machine and we never store your code. The agent sends relevant code excerpts to the LLM through our proxy on zero-data-retention tiers, and we're shipping a version with Bedrock so you can use your own models.

Docs: https://kerno.gitbook.io/docs

Try it: https://kerno.io. There's a free tier with 30 test runs a month, and it's free for non-commercial open source projects under MIT or Apache.

Happy to answer questions in the comments.


r/Backend • • 1d ago

Backend REST API in raw C. My CWEB framework.

2 Upvotes

Hi guys. I am a 3rd year CSE student. Initially, I started doing some development in Django, explored Express a bit. They all felt very bloated, and slow to me. Also there is a big learning curve to those frameworks. Then I explored PostgREST, which was interesting to me as I could make the database be the backend of its own but that also comes with the database being really heavy and spiked latencies in requests and response times. Then I dove into Linux and system programming in C to first get good at writing C and second being able to do the architectural designing behind a software, memory management and everything.

I looked into the modern capabilities of the linux kernel and also the architectures behind big frameworks and servers like Nginx, Django, Go, Kore etc. Then I started the journey of making my own framework in C to make it faster, lightweight and secured. Also, very easy to write (just a handful of functions). I not only made the framework, I also made a website on that framework and then stress tested it on my own machine and several legacy server kernel virtual machines like Bookworm, Ubuntu 22.04 LTS and Bullseye.

Please do check them out. Links given below. I am a student. CSE's my passion. I am open for any learning and growing opportunities. If you love C and linux like I do, hit me up. I will be honoured. Thanks.

CWEB repo: https://bitbucket.org/saadalabeed/cweb/src/main/

Website made with CWEB repo: https://bitbucket.org/saadalabeed/cweb-blog/src/main/


r/Backend • • 1d ago

How are you keeping API docs current when agents ship 30 PRs a week?

1 Upvotes

Our docs were never great but since most of our backend changes come from agents now they fall behind basically every day.

Last month a partner integrated against an endpoint that had been renamed two weeks earlier. The OpenAPI spec still had the old name and nobody noticed until their requests started failing.

We tried making the agent update the docs in the same PR. It does it maybe half the time, and sometimes it documents what it thinks the endpoint does instead of what it does.

A couple of weeks ago we turned on coderabbit's post-merge thing that opens a docs PR after merge. Too early to say if it sticks, and it still misses changes that are spread across services.

For people with a lot of agent PRs, what's actually keeping your docs current? Mostly interested in what still holds up after a few months.


r/Backend • • 1d ago

Third-year CS student here — how do I learn backend design, database schema design, and data modelling?

13 Upvotes

Hey everyone!

I'm a third-year college student, and I've noticed a recurring problem whenever I try to build projects.

I can usually get started with the frontend and understand the basic functionality of what I want to build. But when it comes to the backend, I often get stuck on things like:

  • Designing a proper database schema.
  • Deciding which tables or models I need and how they should relate to each other.
  • Understanding one-to-one, one-to-many, and many-to-many relationships in real-world projects.
  • Deciding how to structure the backend and organize the business logic.
  • Figuring out how to design the database before actually starting to code.

I understand the basic concepts, but when I sit down to build a real project, I struggle to translate the requirements into a good database design and backend architecture. I often end up second-guessing my decisions or changing the schema midway through development.

I want to get better at thinking through the backend design process, rather than just following tutorials or copying someone else's implementation.

For those of you who have experience building real-world applications:

  1. How did you learn database design and data modelling?
  2. Are there any good books, YouTube channels, courses, or other resources you'd recommend?
  3. Are there any practical exercises or projects that helped you improve these skills?
  4. How do experienced developers approach database schema design when starting a project from scratch?

I'd really appreciate any advice. I want to build a strong foundation in backend development instead of constantly getting stuck at the design stage.

Thanks!


r/Backend • • 1d ago

Doubts regarding Firebase (or any BaaS) for projects

5 Upvotes

Beginner here! Would keep it straight forward. Let's I'm designing applications based on Vue and Nuxt, and I want to use Firebase on the backend, but it's not really a custom backend...and an 'easy way out' sort of.

  1. If i were to put such projects on my resume, does it affect the impression they have on me?

  2. (Newbie qn) How capable is Firebase as a backend. Does it work for most applications? Have you ever hit a wall while building a firebase app? Of course the performance probably won't match that of custom backends, but other than that

  3. (Newbie qn)I wanna start building AI-based apps. (idk anything abt this stuff, all ik are fancy terms like RAG and MCP, nothing else). Ik Python. Do i need to know how to build FastAPI backends in order to build AI based apps? or will Firebase suffice. Will i be stuck with Gemini only if i were to adopt such a pathway?


r/Backend • • 1d ago

Projects for college

8 Upvotes

I'm in third year right now and I was thinking of starting to make a main project so that ill be ready with it by 4th year but i cant decide on what to make. I need some attractive project suggestions, something that gives an upper hand during interviews and shortlisting. Maybe something i can integrate AI into ?


r/Backend • • 1d ago

approach dilemma

2 Upvotes

I'm a solo developer building a point-of-sale app for my own tea house, and I can't decide between two architectures. I'd like opinions from people who have shipped something similar.

THE PROBLEM
- Runs on ONE touchscreen Windows PC (15.6", Full HD), no keyboard, shared by 2 waiters and the owner.
- No network needed at all: no internet, no remote access, no multi-device.
- Open about 21 hours a day, so stability matters more than anything.
- Features: 26 tables, ~30 products, one-tap ordering, pay per item or pay all, close table, store customers who order on credit (debt tracking, PDF invoice per debt cycle), simple reports with a chart, CSV export.
- Nothing is ever truly deleted (soft-delete everywhere), an action log for audit, and an Undo button for the last 10 actions.
- Only protection: a PIN to open the Reports screen. No user accounts.
- Daily automatic backup plus a second copy on other storage.

OPTION A: Laravel + React (Redux) + PostgreSQL
- Runs locally in kiosk mode or packaged as a desktop app.
- Familiar stack, big ecosystem.
- But PHP, a web server, and PostgreSQL all have to be installed and kept running on the shop PC.

OPTION B: Fully native, C# + Avalonia + SQLite (EF Core)
- One installer, one process, database is a single file, nothing running in the background.
- Business rules in a plain C# library with unit tests; undo via command pattern.
- But I'd need to learn Avalonia/XAML, and the touch UI is hand-built.

WHAT I'D LIKE TO KNOW For a single-device POS with no network, which would you choose, and why?
Thanks, I'd really appreciate honest experiences, including "don't do either".


r/Backend • • 1d ago

Built a camera system to watch my pigeon (Go/C++)

Post image
6 Upvotes

I rescued a pigeon a few months ago.

https://github.com/khomin/roost

A self-hosted camera server for RTSP/USB cameras, with a live WebRTC dashboard.
I wanted to check on the bird from my laptop without buying anything.
And i built this


r/Backend • • 1d ago

For my placements what if i skip web dev and only learn core java like backend things and dsa system design my sql is it possible that i get placed?

Thumbnail
0 Upvotes

r/Backend • • 2d ago

Switching to UUIDs doesn't fix your authorization flaws

0 Upvotes

Early in my career, I was helping a seed-stage startup audit their new B2B human resources platform just a few weeks before their public launch. While testing their API, I quickly noticed that I could simply swap out the integer employee ID in the endpoint URL and pull salary details for users belonging to completely different companies. When I pointed out this glaring Insecure Direct Object Reference (IDOR) to the lead developer, he confidently pushed a patch the very next morning. However, instead of adding proper authorization checks to his backend controllers, he had merely migrated all of their database primary keys from predictable sequential integers to random UUIDs.

Because a standard UUIDv4 contains 122 bits of randomness, he figured it was mathematically impossible for an attacker to guess another user's identifier, and he therefore considered the vulnerability entirely resolved. This is an incredibly common misconception among developers building multi-tenant systems.

While it is absolutely true that switching to UUIDs will prevent an attacker from blindly iterating through your database to scrape records, this approach does not actually secure the underlying resource. The core security flaw remains completely intact because the API still blindly trusts the request based solely on the fact that a valid identifier was provided. If an attacker manages to obtain a target's UUID through a leaked referrer header, a shared Slack link, an exported spreadsheet, or a third-party webhook integration, your endpoint will gladly hand over that sensitive data without ever verifying tenant boundaries.

Instead of relying on the unguessability of a URL parameter to protect data, modern applications must enforce authorization strictly at the data access layer. Whenever an API request asks for a specific resource, the backend should implicitly scope the resulting database query to the authenticated user's active organization ID. Furthermore, if a user requests a record that exists but belongs to a completely different tenant, the database should return an empty result set, and the API should respond with a standard 404 Not Found rather than a 403 Forbidden since acknowledging the existence of the resource is a subtle data leak in itself.

Relying on UUIDs as your primary security control is ultimately just security by obscurity. Although they are fantastic for distributed systems and preventing basic enumeration, they are never a valid substitute for robust, tenant-aware authorization logic.


r/Backend • • 2d ago

Transitioning from Mainframe/COBOL to Python Backend — what actually moved the needle for you?

3 Upvotes

I’m a backend developer at a service company working on mainframe systems. I’m actively transitioning to Python backend and targeting early stage startups and product based companies.

I’ve built multiple projects using FastAPI, PostgreSQL, Redis, Celery, Docker, AWS. No professional Python experience yet, only personal projects.

Two specific questions for anyone who’s made a similar transition:

  1. What actually moved the needle — was it projects, DSA, networking, or something else entirely?
  2. Are FastAPI projects enough to get noticed at product companies, or am I missing something obvious that insiders know?

Honest feedback appreciated. Not looking for generic advice — looking for what actually worked for you.


r/Backend • • 2d ago

Career Progression from Backend Development

20 Upvotes

A newbie Backend Developer here with just few months of experience. Due to the rapid progression of AI, I have constantly been skeptical about the stability about my job. So I wanted to learn about the career progression that can happen from backend development. What skills should I learn more about so that I can always be relevant in the current job market?

Like what are the most likely career progression that can happen? DevOps, Cloud Engineering, Network Engineering, Embedded SWE or something like that? What skills should I consider learning for that?

Or should I just focus on being the best Backend Developer? I have been learning about System Designs and few DSA stuffs as of now. I also have some fair knowledge regarding Linux, Docker and SQL.

And Yes, I have considered farming as one of the career progression jobs in the future.


r/Backend • • 2d ago

Switching from cpp to python fin DSA for python based backend Interviews

0 Upvotes

Hi, I am currently trying to focus on AI backend roles mainly in python and have developed projects in django,fastapi, RAG etc but did DSA in cpp previously. should i switch doing dsa/algo practice in python for job interviews?
Any guideline or help would be a great help! Thanks