Go Dev Center

Golang Hosting

The platform provides managed Go environments for projects of different sizes and purposes. This guide covers environment creation, supported Golang versions, Git-based deployment, custom domains, and automatic vertical and horizontal scaling.

Go and Golang cloud hosting
Go application hosting and management on the platform.

Go Environment Hosting

Create the required environment through the topology wizard. Open the Go engine tab, add Golang as the application server, and include any additional stacks required by the project, such as load balancers, databases, or shared storage.

  • Set the required application-server node count.
  • Configure the RAM and CPU Cloudlet limits.
  • Attach public IP addresses when direct external access is required.
  • Add supporting database, load-balancing, or storage nodes.
Golang environment topology wizard
Select Golang and configure the required resources, node count, networking, and supporting stacks.
i

Container architecture

The Golang template uses the modern systemd initialization daemon. All instances run as isolated containers and are distributed across available physical servers or virtual machines through automatic anti-affinity rules for improved availability.

Golang Versioning

The currently documented Golang stack versions are:

Golang VersionSelection Method
1.18.10Environment creation or container redeployment
1.21.5Environment creation or container redeployment
1.23.12Environment creation or container redeployment
1.24.13Environment creation or container redeployment
1.25.12Environment creation or container redeployment
1.26.5Environment creation or container redeployment

Select the required version during environment creation. It can be changed later through container redeployment while preserving custom data inside the affected node or layer.

Redeploy Go containers
Change the Golang version through container redeployment.
i

Check the current releases

The Software Stack Versions document is updated regularly. Review it before creating or redeploying a production environment.

Go Application Deployment

After environment creation, deploy the Go project from a Git repository. Deployment from an application archive is described by the source documentation as a planned capability for a future platform release.

The deployment process can be customized with the following container variables:

GO_RUNDefines the executable binary filename. When omitted, the deployment script tries to determine it from the Git project name.
GOPATHDefines the deployment directory. The documented default is /home/jelastic/webapp.
GO_BUILD_OPTIONSSupplies additional options for the build operation. The documented default is -a, which forces rebuilding of packages that are already up to date.
GO_RUN_OPTIONSSupplies additional options for the run operation.
Go application deployment
Configure the Git-based Go deployment and its container variables.

During deployment, the platform automatically:

  • Parses the Git URL to obtain the Go project location.
  • Downloads the project and dependencies with go get.
  • If dependency retrieval fails, downloads it as a regular Git project and retries.
  • Builds the project with go build and the options supplied through GO_BUILD_OPTIONS.
  • Runs the binary selected through GO_RUN, applying any GO_RUN_OPTIONS.
  • Stores the deployed project under the directory defined by GOPATH.

Domains Management

Bind a custom domain to the Go application instead of using the default environment address.

CNAME redirectUse with the Shared Load Balancer. Recommended for development and testing.
DNS A recordUse with a public IP. Suitable for production environments and high traffic.
Swap DomainsRedirect traffic from one environment to another, such as during a zero-downtime version switch.
SwapExtIpsUse the API or CLI to swap external IP addresses when the application is accessed through public IPs.
Golang custom domain management
Bind a custom domain or move application traffic between environments.

Automatic Vertical Scaling

Set the lower and upper Cloudlet limits for the Go server in the topology wizard. The platform dynamically changes the available RAM and CPU within these limits according to current demand.

One Cloudlet equals 128 MiB of RAM and 400 MHz of CPU.

Golang automatic vertical scaling
Set the lower and upper resource limits for automatic scaling.

The application consumes fewer resources when load is low and can scale up to the configured limit as demand increases. Resource charging is based on actual consumption.

Manual Horizontal Scaling

Add extra Golang servers through the topology wizard during environment creation or later adjustment. Use the plus control in the Horizontal Scaling section to choose the required number of instances.

Golang horizontal scaling
Increase the number of Golang application-server nodes.
  • The same-type node limit depends on the hosting provider.
  • The commonly documented limit is 16 nodes and can be increased through a support request.
  • A load-balancing node is added automatically when the Golang application-server layer is scaled.

Automatic Horizontal Scaling

Open Settings > Monitoring > Auto Horizontal Scaling and add triggers that increase or decrease the number of Golang nodes according to application load.

  • Select the required stack or layer.
  • Choose the monitored resource: CPU, RAM, Network, or Disk.
  • Set the scaling threshold and monitoring conditions.
  • Define the node adjustment and permitted node-count range.
Golang automatic horizontal scaling
Configure resource-based triggers to add or remove Golang nodes.

Additional Platform Features

  • Custom SSL and Built-In SSL
  • Public IPv4 and IPv6 addresses
  • A broad selection of managed databases
  • Container firewalls, endpoints, and environment isolation
  • Dashboard management and direct SSH access
  • Open API and Cloud Scripting automation
  • Pay-as-you-use pricing
  • Collaboration features for teams
  • Multi-cloud distribution

Expected Result

A managed Golang environment is created with the selected Go version, resource limits, networking, and supporting services. The project can be deployed from Git, connected to a custom domain, and scaled vertically or horizontally according to application demand.

Important Notes

  • Use the Software Stack Versions document to confirm the current Go releases.
  • The source guide documents Git repository deployment rather than archive deployment.
  • Review GO_RUN, GOPATH, GO_BUILD_OPTIONS, and GO_RUN_OPTIONS before deployment.
  • A load balancer is added automatically when the Go layer is horizontally scaled.
  • A public IP is suitable for production traffic and direct DNS A-record access.
  • Check provider-specific node limits before large-scale expansion.