Backend & DevOps

How to Design a Backend for Mobile Apps That Scales

The API, security and scaling choices that decide how fast and reliable an app feels.

3 min read

Data centre corridor with server racks
Photo: Paul Hanaoka on Unsplash

In short

  • A mobile app backend must cope with old app versions, poor networks and sudden traffic peaks, not only with today’s app.
  • Design the API for the app (a backend for frontend), version it, and never break clients that are still in use.
  • Get authentication right: OAuth 2.0 with the native-app best practices, short-lived tokens and server-side checks.
  • Plan for offline use, push notifications, observability and where personal data is stored.

A mobile app backend is where most of an app’s reliability is decided. The app on the phone can only be as fast, safe and up to date as the APIs behind it. And unlike a website, you cannot force every user to update at once, so the backend has to serve several app versions for months or years. Here is how we would design one that scales.

1. Design the API for the app

Generic APIs built for many clients often make mobile apps slow: too many calls, too much data. A backend for frontend (BFF) is a thin API layer built for one kind of client, shaping data the way that client needs it (Sam Newman). For mobile, that means fewer round trips, smaller payloads and responses that match the screens.

2. Version and never break old clients

  • Version your API, and keep old versions running while real users still have old apps.
  • Add fields rather than changing or removing them.
  • Build a remote “minimum supported version” switch, so you can ask users to update when you truly must.
  • Track which app versions call which endpoints before you retire anything.

3. Authentication done properly

  • Use OAuth 2.0 and OpenID Connect with the practices for native apps: the system browser and PKCE, not embedded web views (IETF RFC 8252).
  • Use short-lived access tokens and refresh tokens that can be revoked.
  • Bind sensitive sessions to the device and check app integrity for risky actions (see our iOS and Android guides).
  • Check every request on the server; never trust the app to enforce permissions.

4. Secure the API

The OWASP API Security Top 10 lists the most common API flaws, with broken object-level authorisation at the top (OWASP). In practice: check that the user may access each specific record, rate-limit endpoints, validate all input and log security events.

5. Design for bad networks and offline use

  • Make write operations idempotent, so retries after a dropped connection do not create duplicates.
  • Support paging and partial updates for large lists.
  • For offline features, decide how conflicts are resolved when two devices change the same data.
  • Use caching headers and ETags so apps download only what changed.

6. Push notifications

Notifications go through Apple Push Notification service and Firebase Cloud Messaging (Apple, Firebase). Keep device tokens up to date, respect user preferences, and never put sensitive data in the notification text itself.

7. Scale and observe

  • Expect peaks: salary day for a banking app, a match for a sports app, a campaign for a shop.
  • Keep services stateless so they scale horizontally; put state in managed databases and caches.
  • Trace requests from the app through every service, and connect app crash reports with backend errors.
  • Set service level objectives for latency and errors, and alert on them.

8. Data location and privacy

Decide where personal data is stored and processed, which cloud regions you use and which sub-processors are involved. For EU customers, and especially for banks under DORA, these answers will be part of every vendor review. Read how to choose a software partner for regulated industries.

From our work

On one mobile banking programme, our work was followed by 5x fewer incidents and failed transactions (case study). We build the backends, CI/CD and cloud infrastructure behind fintech and mobile products, and the Linux and ROS 2 software behind robots.

Technologies you will meet

AreaTypical tools
LanguagesKotlin and Java with Spring Boot, Node.js, Go
APIsREST, GraphQL, gRPC, WebSockets
DataPostgreSQL, Redis, Kafka
RuntimeDocker, Kubernetes, AWS, Azure, Google Cloud, Linux
ObservabilityOpenTelemetry, Prometheus, Grafana

For scaling choices, see Kubernetes for product teams and event-driven architecture with Kafka.

For the delivery side, see mobile DevOps: CI/CD from commit to app store, or explore our mobile software development work.

Frequently asked questions

What is a mobile app backend?

The servers, APIs, databases and services behind a mobile app: user accounts and authentication, business logic, data storage, push notifications and integrations with other systems.

What is a backend for frontend (BFF)?

A thin API layer designed for one type of client, such as the mobile app, that shapes data the way that client needs it, reducing round trips and payload size.

How do I avoid breaking old app versions?

Version the API, add fields instead of changing them, keep old versions running while users still have old apps, and use a minimum supported version switch only when truly necessary.

How should mobile apps authenticate users?

With OAuth 2.0 and OpenID Connect using the system browser and PKCE, short-lived tokens, revocable refresh tokens, device binding for sensitive actions and permission checks on every server request.

Working on something like this?

Tell us where the product is stuck. We answer with a concrete next step.

Send a few lines about the product, the deadline and the team you have today. A senior engineer replies within two working days.