Codifly
Back to blog
c4c7usJul 10, 202321 min read

Deploy an HTTP Backend Service on C4C7OPS

Introduction: In this brief post, we provide a practical guide to quickly and easily deploy an HTTP backend project using the C4C7OPS platform. As an illustration, we will use a

Desplegar un servicio backend HTTP en C4C7OPS - imagen 1

Introduction

In this brief post, we will provide you with a practical guide to quickly and easily deploy a projectbackendHTTP using our C4C7OPS platform.

For illustrative purposes, we will take as an example a project written in the Go language, which is running locally on port 8080. (The source code of the project we will use as an example is available in the following repositoryhttps://github.com/c4c7us-cloud/backend-demo)

Desplegar un servicio backend HTTP en C4C7OPS - imagen 1

Requirements

As a requirement for our project, it must have at least oneendpointque nos sirva dehealthcheck indicándonos que la aplicación se levanto correctamente, este nos debe responder con unstatuscode200, para el ejemplo particular elendpointdehealthcheckwill be found at/api/demo/health-check; When we query it locally, it responds as follows:

Desplegar un servicio backend HTTP en C4C7OPS - imagen 2

Additionally, we will have anotherendpoint(/api/demo/hello-world) as a demonstration of any other route that can be configured within our code.

Desplegar un servicio backend HTTP en C4C7OPS - imagen 3

If we wish to expose the previous service using our platform, we must log in and ensure we have completed the necessary prior configurations; these configurations include setting up the API keys for our cloud service provider, creating a domain and an environment, as well as registering the Git keys in our online repository manager, whether GitHub, GitLab, or Bitbucket.

Configuration

Once we have completed the configurations described above, deploying our service is a simple and user-friendly process. First, we navigate to the microservices section in the main menu. Then, we selectcreateand we proceed to register the parameters of the service we will create, using our project as a base. The parameters to consider are described below:

  • The name used to distinguish the service within C4C7OPS.
  • The repository where our code is hosted online. In our case, since the repository is on GitHub, it looks like this:
Desplegar un servicio backend HTTP en C4C7OPS - imagen 4
  • Service type. In our case, it will be a service, but there are different options such asworkers,schedule tasksorlambdas.
  • Build belonging to the service in question (language/framework and version).
  • Type of access the service will have, either public or private. If we choose private, the service is only accessible by other services deployed within the same VPC network.
  • Theprefix pathbajo el cual van a estar losendpointde nuestra aplicación.
  • La ruta delhealthcheck(tema tratado en un punto anterior).

Una vez configurado debe lucir similar a la siguiente imagen, entonces pulsamos el botón “Save”.

Desplegar un servicio backend HTTP en C4C7OPS - imagen 5

Verificamos que se creó exitosamente.

It is crucial to configure some variables before attempting any deployment of a new service in any environment. Therefore, we enter thesettingssection of the selected environment. In this section, we will find the option to configure the necessary variables for the deployment to be successful.

Once we are in thesettingssection, we can configure the parameters with which the service will run. These parameters include:

  • Cpu units: Here we can assign the number of CPU units that will be allocated to the service. This can be useful to adjust performance based on the processing intensity of our application.
  • Memory: Here we can set the amount of memory allocated to the service. Depending on our application's needs, we can increase or decrease the amount of allocated memory to ensure optimal performance.
  • Minimumandmaximumof instances: We can specify the minimum and maximum number of service instances we want to run simultaneously. This allows us to control the horizontal scalability of the service and adapt it to the expected load.
  • Health check grace period in seconds: This parameter is configured in a number of seconds to determine the maximum wait time to get a response fromendpointthat is configured ashealthcheck.
  • CPU percentage to scale:We configure the CPU usage percentage to control the performance of the instances. If this percentage is reached, and the configuration allows it, a new instance is launched to distribute the workload and avoid overloading.
  • Memory percentage to scale: We configure this parameter to control the performance of the instances. If this percentage is reached, and the configuration allows it, a new instance is launched.
  • Spot instance percentage: We configure this parameter to determine the percentage of the service instances that will be spot instances, keeping in mind that spot instances are more cost-effective but also more unstable.

Remember that it is important to adjust these parameters appropriately to achieve an optimal balance between performance and allocated resources.

After selecting the desired values, we save them. Additionally, if our project requires environment variables for its operation or configuration, we can add them in the tab calledenvironmentvariables.

Desplegar un servicio backend HTTP en C4C7OPS - imagen 6

Deployment

Once we have allocated the resources and configured the environment variables, we can proceed with the deployment of the project in the desired environment. To do this, we navigate to the optiondeploysin the menu, and upon selectingcreate, we enter the name of the tag, branch, orcommitthat we want to deploy from the source code. In our example, we will use the branchmain/master.

Upon entering the tag or branch name, the platform will start the deployment process using the corresponding source code. This involves compiling, building, and running the project using the previously configured resources and environment variables.

Upon pressing the buttoncreatethe project launch will begin, and we just need to wait for it to complete successfully. Similarly, we can view the stage and status of thedeploy, which, if successful, will look like the following image.

Desplegar un servicio backend HTTP en C4C7OPS - imagen 7

During the deployment process, we can view in detail the instances that are created to host the service. The number of instances is determined by the value assigned to the configuration variableminimum of instances. In the previous image, you can see the status of the instance, its ID, and which deployment it belongs to.

Verification

Finally, with our service deployed, we can access theendpointsit exposes over the internet by pointing to the domain associated with the environment where the service was deployed, and respecting theprefixpathconfigured at creation time. As an example, the following shows the results of querying theendpointswe had locally once the deployment was completed.

Desplegar un servicio backend HTTP en C4C7OPS - imagen 8

Summary

In summary, throughout this post we managed to deploy an HTTP backend service that was initially running locally. Through our C4C7OPS platform, we managed to expose this service to the internet. The key steps we followed were:

  1. Creation and configuration of the new microservice: We defined the microservice type, the programming language used, and the repository where it is hosted.
  2. Instance variable configuration: We set the variables that describe the behavior of the instances where the service will run. This includes aspects such as the minimum number of instances required.
  3. Service deployment in a specific environment: We launched the service deployment in the desired environment. This resulted in our service being exposed and accessible to the public we want to reach.

In summary, we successfully migrated our localbackendservice to an online environment, allowing it to be publicly available using our C4C7OPS platform.

Why C4C7OPS Simplifies HTTP Backend Deployment

Deploying backend services traditionally involves configuring infrastructure, managing containers, and wiring health checks before traffic ever reaches your application. C4C7OPS, built by Codifly, removes that overhead by automating the deployment pipeline so your HTTP service is reachable, monitored, and production-ready in minutes rather than hours.

The platform expects a health-check endpoint that returns an HTTP 200 status — such as /api/demo/health-check — to confirm the application started correctly. Once that check passes, C4C7OPS routes traffic to your service automatically.

  1. 1Prepare your backend projectEnsure your service exposes at least one health-check endpoint that returns HTTP 200. The example Go project at github.com/c4c7us-cloud/backend-demo uses /api/demo/health-check running locally on port 8080.
  2. 2Push to C4C7OPSConnect your repository or upload your build artifact. The platform detects the port, verifies the health check, and provisions the infrastructure automatically.
  3. 3Verify and monitorOnce deployed, C4C7OPS provides a public URL. Confirm the health-check and demo endpoints respond correctly, then monitor uptime through the platform dashboard.

FAQ & Resources

C4C7OPS by Codifly

Deploy your first backend in minutes

Connect a repository, pass the health check, and go live. C4C7OPS handles infrastructure, routing, and monitoring so you can focus on shipping code.

Read the docs

Related articles