DevTeam.Space Product Development Blog

Explore our in-depth product development tutorials and new technology announcements published by our software development experts

All articles

Where to host mobile app backend?

Three smartphones connected with a circle in which Backend is written

As of 1st quarter of 2018, Google Play had 3.8 million mobile apps, whereas the corresponding number in the Apple App Store was 2 million! If you add Windows Store and Amazon Appstore, that’s another million apps, and you can see how mobile apps have become all-important. Read the Statista report “Number of apps available in leading app stores as of 1st quarter 2018” for more details.

A decade ago, if you had to market your product or service to a global audience, you had to have a website. Today, you still need that website, but it’s simply not enough, because you also need a mobile app.

But, do mobile apps need servers?


Well, you can hardly hope to market your product successfully with a mobile app that has only simple client-end processing. You need a backend, that is a server, but that brings a host of other questions. One such important question is how to decide on the best backend mobile app hosting, and in this article, I will describe the options you have.


Why mobile app backend in the first place?
What are your options to manage backend for mobile apps?
MBaaS: The easiest option for hosting your mobile app’s backend
MBaaS providers compared
Hosting a backend for your mobile application using ready-made tools: the “Middle” option
Mobile app hosting in the ‘Do-It-Yourself’ way

Why mobile app backend in the first place?

A schematic representation of how mobile app backend works

For the sake of clarity, I will just remind here about what a mobile app backend is: it’s that component of your app that handles security, data storage, and business logic. You need a backend if your app uses any of the following features, and this list is just an example:

  1. Usage analytics;
  2. Extended security;
  3. Advertisement handling;
  4. Communication between users;
  5. Push notification.

Read more about scenarios when an app needs a backend in “Back-End as a Service for Mobile Apps”. As you can see, except for ultra-simple apps, you most likely need a mobile app backend.

What are your options to manage mobile app backend?

After we‘ve established what backend is and why you need it, it‘s time to discuss how to host a mobile app and all the peculiarities in terms of the backend that come with it. Developing the backend of mobile apps is an entirely different ball-game from front-end development. For e.g., you and your team must have the following knowledge:

  1. Network infrastructure including web servers;
  2. Database management;
  3. Server-side programming;
  4. Modern cryptography to ensure security;
  5. Big data;
  6. Mobile telecommunications network.

But, all this raises another issue – that of hosting for app development.

You have options for the overall management of mobile app backend, and these are as follows:

  1. You can rely on a ‘Mobile Backend as a Service’ (MBaaS) provider and consume their service. It’s the easiest option, the provider handles the hosting, and you are likely to experience a faster ‘Time-to-market’. Read more about it in “How To Choose The Best Mobile Backend As A Service (MBaaS)?”.
  2. You can code your mobile backend using existing tools and templates that some Cloud service providers, for e.g. Google, offer. It’s not as easy as the earlier option, however, you at least have market-leading services that you can rely on. The Cloud service provider addresses your hosting requirements.
  3. The hardest option is for you to code your entire backend yourself and find a provider that will host your mobile app. This option needs a wide variety of skills, besides it’s a lengthy process. If you need a wide choice of customization and have the required expertise in your team, you can consider it.


MBaaS: The easiest option for hosting your mobile app’s backend

MBaaS providers leverage the Cloud computing “as-a-service” model, where you consume their service while they manage your mobile backend. A good MBaaS provider will offer you the following:

  • Secure infrastructure and storage;
  • APIs including social network and several others depending on your app requirements;
  • Ability to seamlessly navigate various mobile platforms and devices;
  • User authentication and management;
  • Persistent data storage;
  • Push notification;
  • Geolocation services;
  • Analytics;
  • Ability to leverage microservices architecture;
  • Ease of use and superb customer support.

Read more about the MBaaS model in “mobile backend as a service (mobile BaaS)”.

MBaaS providers compared

An image of a laptop in the background with logos of different MBaaS providers in the foreground

You have multiple choices of MBaaS providers, as follows:

  • Google Firebase: Google acquired Firebase in 2016 and entered the MBaaS space. Firebase offers the following categories of services:
    • ‘Develop’, which includes a cloud database, user authentication, messaging, and storage. It also includes hosting, testing tools, and crash reporting features.
    • ‘Grow’ category of services helps you analyze user interactions, and include analytics, indexing, and dynamic linking.
    • ‘Earn’, for advertising.

They have a free tier, and you pay beyond a threshold.

  • Apple CloudKit: This is Apples’ MBaaS offering. It offers most MBaaS services and is very good for developing your iOS apps. It’s also good if you are developing simple apps, however, they don’t support implementing server-side logic, and developers need to run application logic in the client side. You pay when you cross the threshold for their free-tier.
  • Kinvey: Gartner recognizes them as a “Visionary” in their 2018 Magic Quadrant 2018 report, and it’s justified because of the wide set of services they provide. In addition to standard MBaaS features, their ready-made app templates are very helpful. Their analytics offering is rich, while you can build native, hybrid, and IoT apps with their SDKs.
  • AWS: Amazons’ MBaaS provides a rich set of services covering the entire MBaaS spectrum. Amazon Cloud is excellent, and it’s an advantage when you use their service. They also have a free tier; however, the AWS MBaaS isn’t easy to use. So, how much does it cost to host an app on AWS? The most straightforward answer would be that it depends on the number of users your app has. As we‘ve said, there‘s a free server that can be used for 1 year for hosting a mini-site or a small app, after that the price is $8-10 a month, but if you have more users, then the price rises exponentially, and for big startups and corporations, it can be as high as $5,000 a month.
  • SashiDo: Many mobile backend developers were big fans of the Parse, an MBaaS provider that closed in 2017. A big advantage of SashiDo is that it’s built on the Parse open-source code and works like it. Their offerings cover the entire gamut of MBaaS, and while they don’t have a free tier, their customer service is excellent.
  • Kumolos: While they offer all standard MBaaS features, their platform is more suited to mobile app development companies. Kumolos offers a client portal that clients of the app development company use, to monitor trends about their mobile app. This MBaaS provider also offers an agency console that enables app development companies to manage their portfolio.

Read our comparison of MBaaS providers in “How To Choose The Best Mobile Backend As A Service (MBaaS)?” for more details.

Hosting a backend for your mobile application using ready-made tools: the “Middle” option

I will now explain the option that falls between relying solely on an MBaaS provider and coding your backend entirely yourself. While MBaaS is a nice option for you to host a backend for your mobile application, there are times when you need higher flexibility.

In this section, I will explain how you can use the Google Cloud service, and build your backend using their ready-made tools. I have earlier explained how you can consume Google Firebase services for your backend, hence let’s consider it the starting point.

While you can start easily with Firebase and bring your mobile app to life quickly, you may have a more complex requirement. For e.g., if your app needs to modify synchronized data, you need more customization options.

Firebase and Google App Engine standard environment

The Google App Engine standard environment is a ‘Platform as a Service’ (PaaS), which can monitor, scale and update the hosting environment. As with the Cloud computing PaaS model, you bring your code and data.

For your mobile app backend, it means that you need to code your backend. Read more about the App Engine standard environment in their Google Cloud document repository.

Here I recommend that instead of coding your mobile backend from scratch, you extend Firebase. This automatically provides you with real-time data synchronization. While your app can now modify synchronized data, what if you need a higher level of customization?

For e.g., do you need to:

  1. Call native binaries or write to a file system?
  2. Have a persistent connection to Firebase?
  3. Make other system calls?

Now, you need more customization. Read on!

Mobile app backend with Firebase and Google App Engine flexible environment

A sketch of an airplane engine which is a Google App Engine logo

Google App Engine flexible environment allows you more customization option over the standard environment. It does everything that the standard environment can do, however, it uses Docker containers.

Since it runs your backend service inside the container, you can configure it. Read more about Docker containers in “WHAT IS A CONTAINER”.

This enables you to call native binaries, write to file systems, or make other system calls. Find out more about the App Engine flexible environment in their Google Cloud services documentation repository.

While you have customized more with this step, what if you want more customization? Read on, to find out what you can do to automatically generate client libraries. Your app can use them to call the backend directly.

Google Cloud Endpoints and Google App Engine for your mobile app hosting

Your mobile app can make direct API calls, using the client libraries that the Cloud Endpoints generates. You don’t need to write code to facilitate communication with App Engine. As earlier, App Engine being a PaaS handles hosting, scaling, monitoring, etc.

This approach also allows you to reduce storing files on the mobile device since you are moving files to the Cloud storage. Additionally, the Cloud messaging service allows push notifications. Read about the Google Cloud Endpoints in its’ Google Cloud documentation.

So, you have customized more, and that’s great! However, you can’t use this approach, and must customize more, if your app needs to do the following:

  1. Automated and real-time data synchronization between mobile devices;
  2. Backend services requiring 3rd party services or custom servers;
  3. Connect to systems without SSL.


Mobile app hosting in the ‘Do-It-Yourself’ way

We are progressing on a continuum in which we started with using an MBaaS. We didn’t have options to customize, hence, we moved using PaaS such as Google App Engine, where we had more customization options. If your customization requirements are higher, then you need a ‘Do-It-Yourself’ (DIY) approach.

It’s the hardest way to manage your backend requirements, where you need to build your backend on your own and find mobile app hosting providers too. It’s a complex project and if you don’t have the necessary backend development, infrastructure, and security skills in your team, consider getting professional help.

Programming languages to develop the backend for mobile apps

While you have choices of mobile app backend programming languages, I recommend that you consider one of the following:

  1. Java: Java has many advantages, e.g. portability, security, availability of skills, excellent memory management, and a rich ecosystem. Read “Why Should You Use Java for Your Backend Infrastructure?” for more details.
  2. JS: It’s an increasingly popular choice for Mobile backend development. It’s open-source, free to use, and if your team has JavaScript skills, they will find it easy to work with the cross-platform runtime environment of Node.JS. Read more about it in “What is Node.js”.

Select a mobile app server hosting provider

Once again, you have a wide choice of mobile app hosting providers. I recommend you explore the following, however, it’s not an exhaustive list:

  1. Google Compute Engine: This is Google’s ‘Infrastructure as a Service’ (IaaS) Cloud offering. You can create and run virtual machines. They offer reliable service with good scalability, performance, and value for your money. You can connect your app to your Compute Engine instances using REST and gRPC protocols. There is very good documentation, check out the Google Compute Engine document repository for more details.
  2. IBM Cloud: Previously known as SoftLayer, IBM Cloud provides you with both bare metal and virtual server options. IBM Cloud is competitive on all the key parameters you can think of, for e.g. network, data transfer, bandwidth, management, monitoring, and customer support. Visit the IBM Cloud website for more details.
  3. Digital Ocean: Another leading IaaS provider, you will find it easy to deploy virtual machines with them. The company has a good process, methods, and tools (PM&T) for deployment, scaling, management, monitoring, and security. Check the Digital Ocean website to find out more about them.
  4. Rackspace: A Cloud hosting provider, as well as a managed cloud services provider, they have expertise in all major cloud platforms. Gartner Magic Quadrant for 2018 recognizes them as a leader among Public Cloud Infrastructure Managed service providers. Find out more about them on the Rackspace website.

Additional tools to consider when using a custom backend server for mobile apps

Depending on your app, you may also have to explore additional tools in the DIY approach, as follows:

  1. ‘Content Delivery Network’ (CDN): Will you have many downloadable assets in your app, for e.g. images and videos? You are likely considering storing them with your cloud provider.
    1. You should explore using a CDN to make downloads easy for your app users.
    2. CDNs help in the speedy delivery of content because they replicate it across multiple locations.
    3. Incapsula, CDN77, Liquid Web, and Rackspace are good options for you, but there are more choices.

Read more about CDNs and good CDN providers in “List of 17 Best CDN Service Providers of 2018: Updated Reviews”.

  1. Orchestration: If you need multiple servers for your mobile app backend, consider a good orchestration set-up. Since these services automate deployment, scaling, and management of cloud resources across multiple servers, you can improve your productivity. Kubernetes is a good option. Docker Swarm is another good orchestration option, read more about it in “What is Docker Swarm? A discussion on container orchestration & potential solutions”.

I recommend that analyze your requirements carefully. If ‘Time-to-Market’ is your priority, you are better off with an MBaaS to host your Mobile app backend. On the other hand, if you can’t do with customization, consider the middle way or the DIY approach I have described, however, prepare to deal with more complexity.