ProductChat

The benefits of self-hosting your own chat backend

Nov 29, 2021

Whether you’re an app developer or a product manager, you probably have heard a thing or two about Chat APIs. Better yet: you may be evaluating whether a chat API is the right kind of solution for your app. While we at Weavy are big fans of chat APIs, we also think that they’re only part of the solution. To truly maximize your functionality and minimize your risk when adding in-app chat, you need to start exploring the world of chat backends, and think about how you choose to host them.

chat backends

What is a Chat backend?

A chat backend is a software that gives developers all the tools they need to create and deploy a fully functional chat server. This server provides the infrastructure necessary to add in-app chat to your app via the implementation of a chat API. Any good chat backend will have all the support for native UI kits, as well as the requisite code and files necessary to make implementation as smooth and quick as possible.

 

As this backend will prove to be the backbone of your app’s chat functionality, it’s important to make sure that the backend supports the features and functions that are important to your app and your end-users. At a bare minimum, any modern chat backend should be able to provide industry standards such as the following:

 

  • Typing indicators 
  • Read receipts
  • Rich media support, including photos and video playback
  • Group chats
  • Direct messaging
  • Message reactions

 

Other quality of life improvements to look out for are support for file attachments, third party integrations for things like popular file sharing or video calling services, and the ability to add or remove users from a chat at will. Of course there’s no such thing as the perfect product, and you may find that an otherwise great Chat backend may be missing a feature your team wants. The benefit of a good backend solution is that that doesn’t mean creating that functionality is impossible, but we’ll get to that later.

 

What’s the difference between a Chat API and a Chat backend?

The differences between an API and the backend are both myriad and significant, but at the risk of being reductive it boils down to this fundamental difference: a chat backend allows you to create the chat server that will host and manage your in-app chat solution, a chat API is the code that tells your app how to properly talk to and present the data from the backend. A chat API is typically only a few lines of code that you integrate into your app’s code base, whereas the chat backend is a full fledged file system that the API reads and writes chat data from. 

Screen Shot 2021-11-17 at 6.36.35 PM

There are two methods to hosting a chat backend: third-party hosting and self-hosting. In third-party hosting, a chat API reads and writes from a chat server hosted independently of your app, and then populates a chat UI within the app. In self-hosting, the chat server lives on an instance that you maintain complete control of, often the same instance that hosts your app. Many of our competitors in the in-app chat space differ from Weavy in that they do not provide an option for a self-hosted chat backend. Though this is an option that Weavy also provides for customers, there are some large drawbacks that may not make it right for your business.

 

The benefits of self-hosting

As I mentioned above, when you choose to self-host you backend it’s possible to add functionality that may not have been available out of the box. This is only possible because a self-hosted backend puts your development team in control of the chat server, allowing them to make changes to the underlying code as they deem necessary. 

 

At Weavy, one of the things our development team most prides themselves on is how customizable the server backend is if you self-host and know how to code. We host regular Hack-a-Thons where we let our developer community push our backend, and we continue to be amazed at what people are able to make using our toolset. When it comes to adding functionality to your in-app experience, a self-hosted backend makes it true that “where there’s a will, there’s a way.” When using an in-app chat solution that doesn’t provide an option for self-hosting, this kind of customization is essentially impossible. 

 

Beyond being able to control how your chat server works and what your chat server does, self-hosting gives you a pathway to truly owning your data. By hosting and maintaining your own chat server, your data is truly yours to do with as you please. This means more freedom for your business, and more peace of mind for your users who don’t have to worry about any companies acting as middlemen for their chat data. It also means that should you choose to move away from your present chat solution for any reason your data can come with you to your next solution at no charge. Data ownership is incredibly important, so important that some of our competitors even charge a fee to allow you to even export your chat data.

 

There are also performance benefits that come from self-hosting. Since you’re hosting your own chat server, that means that your chat functionality can be hosted in the same instance as your app. This creates a better user experience as having your chat server and app server in the same physical location dramatically reduces the possibility of latency between the two servers, and thus a lag in the chat UI. 

 

It’s important to remember when working with APIs, data, like sound or light, has a speed limit. Though advances in networking technology are raising the speed limit all the time, it is beyond our current understanding of physics for any information to be delivered instantly. Put another way, the further away your app server is from your chat server, the longer it will take for an API call to travel from one to the other, and the longer it will take for the response to be delivered. This is the reason so many API-only service providers charge incredibly high prices for things like dedicated servers or bare metal deployments.

 

In-app chat has become a fundamental feature, and while many companies have leapt at the chance to provide it through API based solutions, only a few offer self-hosting. Though setting up a self-hosted backend takes a little more development time than simply using an API, the benefits greatly outweigh the drawbacks. A good chat backend allows you to integrate the functionality you want expediently and with very little work if you desire, while still giving your product the option of customizing or growing the feature set as your app grows. Chat APIs may put your app in the collaboration race, but self-hosting chat puts you in the driver’s seat.

 

Add Chat to your app with our API & SDK

Weavy

Share this post