Recently DDI Development company has developed the project of the logistic company from the USA. Our team worked on the service system optimization and productivity improvement.
About Go programming language
It has been created by Google corporation and is often called ‘Golang’ that means ‘Google language’. It was released in November 2009, and the latest 1.9 version was presented in August 2017.
The key person who took part in Go creation was Rob Pike, the famous developer of the programming languages and operating systems, working in Google corporation.
When delivering a speech at one of the conferences, he has noted that Go language is an attempt to adopt the best C ++ and Java languages practices that made it multithread and compiled.
- Compilation speed
There is a vast number of corporations that use Go language when building their projects. First of all, it is Google Inc., Basecamp, BBC Worldwide, Canonical, DigitalOcean, Dropbox, eBay, Yahoo and many others companies.
The challenge we faced
The service is actively used across the USA and in other countries of the world. As the system load was increasing with the project traffic, the processing capacity should be increased as well. The project has been written in PHP programming language, so sometimes system load reaches 80-90% of total capacity.
This project contains data updated through WebSocket in order the system operators receive relevant information. This part of the project was a weak spot. The only way to avoid it is to use a huge number of extra calculation power to scale load down and be ready for the maximum loading.
That leads to spending a huge amount of money. Based on the in-depth analysis our team decided to take out a functional part of the service in microservice to be scaled. Our development team decided to use Go language among PHP / Nodejs /Python to resolve highlighted above problem.
How we solved a problem using the language GO
Due to Go/Golang programming language high productivity and huge support we can save on server with further microservice scaling.
Outlined microservice has been taken out on the separate server. After the long-lived operation, it was noted:
- load of the basic application was considerably reduced;
- load of the microservice working through WebSocket also did not reach peak loadings;
- the processor peak-loading was 40%.
In the mode of operation and server monitoring, it was noted that service load has been highly reduced that allowed our client to save about $50 000 a year on server costs. It was great success and good work was done.
Drawing a line
If you want to create high-performance service, it can be written in Go language to save on server costs. This language is not good enough to build corporate or promo websites because each technology is used in particular implementation area and Go programming language approves on microservice.