Services

Understand Services, the components of your Apps where your code lives.

Services represent a component of your application like web services, APIs, and workers. When you create a Service, we deploy autoscaling containers for you. Services are automatically versioned to provide full traceability. They can be deployed using Docker containers or directly from Git.

This documentation explains :

  • Service types: the different types of services you can deploy on Koyeb.
  • Continuous Deployment and automatic versionning: the deployment options available to perform continuous deployment with Koyeb. Koyeb lets you deploy services using Docker containers or from Git.
  • Service options: the different service options including resource allocation, regions, network port mapping, horizontal scaling, and environment variables configuration.
  • What powers your Services: the technology used to run and secure your services.

Service types

Services are designed to let you run the various components of your stack including:

  • web apps and APIs: you can run any HTTP web application or API. We support running both public (accessible through the internet) and private (only accessible by other services of your app) APIs. The only requirement for the code you deploy is that it should be able to handle HTTP requests.

  • workers: you can easily run workers to perform background tasks and asynchronous jobs. Workers are not exposed to the internet and private network. If you're not familiar with the concept of asynchronous processing, read our introduction to synchronous and asynchronous processing.

  • functions: you can easily break down your app into small functions and deploy them on Koyeb.

These different components are all represented as Services inside of Koyeb.

Continuous Deployment and automatic versioning

We provide two main options to deploy Services in an app:

  • Git: simply git push, we build your app, deploy it and run it for you. Read our documentation on how-to deploy with git for more details.
  • Docker images: you can deploy your application using docker images stored on any private or public registry. When you build your own Docker image, you control the whole execution environment of your app. Read our documentation on how-to deploy a Docker image for more details.

We provide full traceability and record all the changes you make to the configuration of your application.

Services Options

  1. Container size: Select the correct amount of resources for an instance of your application. The recommended way to scale your application is to enjoy the seamless horizontal scaling provided by the Koyeb platform but some applications require a significant amount of resources for a single instance to perform well.

    Check out our pricing page to explore our container sizes. We provide options with up to 64GB of RAM, 32vCPU, and 640GB of SSD, and even more for demanding applications.

  2. Regions: You have the possibility to select in which region of the world your services will run. You can select one or more regions in which your service will be available. End-users will automatically be redirected to the nearest region where your service is running thanks to our global edge network.

  3. Horizontal scaling: You can easily define the number of simultaneous containers running per region for your Service. If you select a different minimum and maximum, the number of simultaneous containers will be autoscaled between these values depending on the number of incoming requests.

  4. Ports: By default, all network ports are blocked, you need to explicitly define on which network port your application listens for incoming traffic. Exposing ports is needed for public and private services receiving incoming requests but not for workers. The protocol and ports are also used to perform health checks.

    To make your Service reachable for everyone through the internet, select Expose publicly. Koyeb will automatically make your service available at https://<appname-orgname>.koyeb.app<path>. All requests will be proxyfied to the port you selected and load-balanced between your nodes.

  5. Environments variables: Environments variables can be used to configure your app during both execution and build (if you deploy from git). Secrets can be exposed to your app through environment variables.

What powers Services?

Services are serverless, secure, isolated, virtualized containers running all or a part of your App. The virtualization technology we use to run your containers, Firecracker, offers a lot of advantages in terms of security and performance. You can learn more about Firecracker on our blog: