Search Knowledge Base by Keyword

Golang Developer’s Centre

Along with providing Java, PHP, Ruby, Python, .Net, Node.js programming languages, UKHost4u has also started providing Golang hosting. It is one of the best multilingual cloud providers. Go environment hosting lets you run projects of all sizes and natures. 

This article will enlighten you about all the Go language related possibilities and its unique features in the UKHost4u PaaS platform. Have a look at what you will learn in this article;

1. Go Environment Creation And Hosting

2. Version Of Golang

3. Go Application Deployment 

4. Domains Management

5. Automatic Vertical Scaling

6. Manual Horizontal Scaling

7. Automatic Horizontal Scaling

1. Go Environment Creation And Hosting

Use the UKHost4u Environment Topology wizard to create the suitable environment for hosting the Go application.

Visit the Go engine tab in the wizard, set Golang as your application server and any software needed for your project for instance; load balancers, databases, or shared storage. If required, manage the nodes count of your environment, cloudlet limits for RAM and CPU, link Public IPs, etc.

2. Versions Of Golang

UKHost4u supports the below-mentioned versions of the Golang application;

– 1.14.15

– 1.15.15

– 1.16.13

– 1.17.6

You can choose the desired Golang version while creating a new environment, or you can change it for an existing environment by clicking on the container redeploy. Furthermore, all the custom data will be stored, which, for instance, permits to conveniently update the version of your software after the new stack template is released. 

3. Go Application Deployment

You can easily deploy your Go project from the Git repository after successfully creating the environment.

You can adjust the below-mentioned container variables by to possibly customise the application deployment process;

– GO_RUN: poses a name of the runnable binary file.

– GOPATH: specifies the deployment folder.

– GO_BUILD_OPTIONS: dispenses extra options for the build operations.

– GO_RUN_OPTIONS: gives extra options for the run operations.

The UKHost4u PaaS platform performs the below-mentioned deployment steps by default;

  • Analyses the given Git URL to obtain a link to the Go project.
  • Install the package having all the dependencies through the go get command.
  • Performs the installation for the common Git project and reattempts getting the Go dependencies, if an error occurs.
  • Forms the project using the go build command.
  • Executes the binary specified by the GO_RUN variable using the go_run command.

Once the deployment is successful, the Go project is placed in the directory set along with the GOPATH variable. 

4. Domains Management 

You can conveniently bind an external custom domain name to your Go application at UKHost4u rather than using the default environment domain name. According to the used entry points, there are two choices;

  • CNAME redirect: For dev and test environments, CNAME redirect is recommended while using the Shared Load balancer.
  • DNS A record: can handle extreme traffic load and is apt for production environments if using the Public IP.

You can also swap the domains to redirect the traffic from one environment to another.

5. Automatic Vertical Scaling 

UKHost4u enables automatic vertical scaling of resources to provide the resources when required. It allows the resources like RAM and CPU within the specified limits and according to the user demands without any manual interference. This UKHost4u specification ensures you don’t pay for the resources you haven’t used. With this you also save extra time in handling the load-related adjustments of the resources or infrastructural changes. 

The process of scaling the resources is managed by the platform automatically. You just have to specify the lower and upper cloudlet limits (one cloudlet = RAM 128 MiB and CPU 400 MHz ) for your Go server using the Environment Topology wizard;

Your Go application will work inside these limits minimising the consumption of resources when traffic load is less and maximising it when the traffic load is more. As a result, you only pay for the resources you actually employ. 

6. Manual Horizontal Scaling

Additional Golang servers can be conveniently added using the Topology wizard while creating an environment or adjusting a pre-existing environment. Inside the Horizontal scaling section use  the + or – buttons to add the required number of nodes. 

The specific cloud hoster’s settings determine the maximum number of the same kind of servers inside a single environment’s layers.

You must also observe that while scaling the Golang server, the load balancer is added to the environment topology by default.

7. Automatic Horizontal Scaling

Tunable triggers are used to do Automatic Horizontal Scaling which lets you increase or decrease the number of nodes because of the application load. Open the preferred environment’s settings and then go to the Automatic horizontal scaling section, and then click on the Add button to configure the environment. 

Adjust the conditions of scaling and configure the triggers for particular stacks and resources such as RAM, CPU, Network, Disk, etc.

Run your dev, test, and production environments efficiently with Go lang cloud hosting at UKHost4u.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.