bars icon
magnifying-glass icon

Background worker

A background worker helps to offload long-running function calls to the background so that your product's interface won't freeze.

Usually this is a service that listens to the queue for tasks from an API and other sources.

Deploying a background worker is pretty similar to deploying an API. You can launch a background worker as a private service as long as the queue is on the same private network.

Use these instructions to run the API using your programming language:


If you don't have a queue yet, you can deploy one on Hostman.

Launch Kafka or RabbitMQ to receive tasks from the API.



Your data must be stored in a database. Hostman provides you with out-of-the-box databases: PostgreSQL, MySQL and MongoDB. When you deploy them using Hostman, you see the database requisites right in your Dashboard.

Other supported databases

We have other databases in our backlog. If you would like us to implement support for your database, please email us.

You can also install any other database using a Docker container.

File storage

enter image description here

If you are not planning to scale your API, you can use local storage to store your files. Use persistent storage for files that will not be deleted between deploys.

When you need to scale your service, it's important to store files outside the node. There are many different options.

We recommend using GridFS. GridFS is the MongoDB specification for storing and retrieving large files such as images, audio files, video files, etc. It is a storage file system, but the data is stored in MongoDB collections.

To use GridFS you need to deploy MongoDB and install the GridFS driver for your programming language.