Golang Hosting on FullHost.Cloud
FullHost.Cloud is a multilingual cloud platform that supports various environments, including Java, PHP, Python, Ruby, Node.js, .NET, and now Go, enabling projects of all sizes and complexities.
In this article, you'll explore the key features of Go hosting and discover the capabilities FullHost.Cloud offers for running Go applications.
Go Environment Hosting
To host your Go application on FullHost.Cloud, use the Topology Wizard to create the appropriate environment.
Navigate to the Go engine tab, add Golang as your application server, and include any additional software stacks required for your project (e.g., load balancers, databases, or shared storage). You can also adjust the node count, cloudlet limits (RAM and CPU), and attach Public IPs as needed.
For more details on environment setup, refer to the Create Environment document.
Golang Versioning
FullHost.Cloud currently supports the following Golang stack versions:
- 1.17.12
- 1.18.10;
- 1.19.12;
- 1.20.12;
- 1.21.5
- AlmaLinux: 1.20.14; 1.21.13; 1.22.7; 1.23.1
The list of available releases is regularly updated in the Software Stack Versions document.
You can select the preferred version during environment creation and change it later through container redeployment. During redeployment, all custom data within the node(s) is preserved, making it easy to upgrade your software when a new stack version is released.
Go Application Deployment
Once your Go environment is created, you can deploy your Go project directly from a Git repository (deployment from an application archive will be available in an upcoming platform release).
You can customize the deployment process by configuring the following container variables:
- GO_RUN – Specifies the name of the executable binary file (if not set, the deployment script will attempt to find one based on the Git project name).
- GOPATH – Defines the deployment folder (/home/jelastic/webapp by default).
- GO_BUILD_OPTIONS – Provides additional build options (-a by default, to force rebuilding of up-to-date packages).
- GO_RUN_OPTIONS – Provides additional options for the run operation.
During deployment, FullHost.Cloud automatically performs these steps:
- Parses the provided Git URL to locate the Go project.
- Downloads the package and dependencies using the go get command.
- If an error occurs, retries the download as a general Git project and attempts to fetch Go dependencies again.
- Builds the project using the go build command (with options specified in GO_BUILD_OPTIONS).
- Runs the binary defined by GO_RUN using the go run command (with options specified in GO_RUN_OPTIONS).
After successful deployment, the Go project is placed in the directory specified by the GOPATH variable. The workspace hierarchy follows the structure outlined in the official Go documentation.
Domains Management
FullHost.Cloud allows you to easily bind an external (custom) domain name to your Go application, replacing the default environment domain. Depending on your setup, you have two options:
- CNAME Redirect – For Shared Load Balancer, recommended for development and testing environments.
- DNS A Record – For Public IP, suitable for production environments with high traffic loads.
Additionally, you can seamlessly swap domains to redirect traffic between environments (e.g., switching to a new application version without downtime).
Automatic Vertical Scaling
FullHost.Cloud’s automatic vertical scaling dynamically allocates resources (RAM and CPU) based on your Go server’s current demand, without the need for manual intervention. This ensures that you only pay for the resources you use, avoiding overpayment for unused capacity, and eliminates the need to manage load-related adjustments or architectural changes.
The platform automatically handles the scaling process. All you need to do is specify the lower and upper cloudlet limits (each cloudlet equals 128 MiB of RAM and 400 MHz of CPU) for your Go server using the topology wizard.
Your application will operate within these limits, reducing resource usage when load decreases and increasing resources when load rises, ensuring efficient and cost-effective resource management.
Manual Horizontal Scaling
You can easily add extra Golang servers through the topology wizard during environment creation or adjustment. Simply click the “+” button in the Horizontal Scaling section and specify the required number of instances.
The maximum number of same-type servers within a single environment layer typically depends on your hosting provider’s settings (usually capped at 16 nodes). This limit can be increased by contacting support.
Additionally, when scaling Golang servers, a load balancer node is automatically added to the environment topology to ensure proper distribution of incoming requests.
Automatic Horizontal Scaling
Automatic horizontal scaling in FullHost.Cloud is achieved through tunable triggers, which adjust the number of nodes based on application load. To configure this feature, navigate to Settings > Monitoring > Auto Horizontal Scaling in your environment and click the Add button.
From there, you can set up triggers for specific resources such as CPU, RAM, Network, and Disk by defining the conditions under which scaling should occur. This ensures your application scales dynamically to handle fluctuating loads without manual intervention.
In addition, FullHost.Cloud Go hosting provides a range of features and functionalities, including:
- Custom or FullHost.Cloud SSL
- Public IPv4 and IPv6 support
- A wide choice of managed databases
- Container firewalls, endpoints, and environment isolation
- User-friendly UI with direct SSH access for management
- Open API and Cloud Scripting for automation
- Pay-as-you-use pricing model
- Collaboration tools for teamwork
FullHost.Cloud Go hosting is optimized for running development, testing, and production environments. Sign up today and get started with Go cloud hosting on FullHost.Cloud.