loader image
Golang Ruby on Rails Web Development

Golang Vs Ruby on Rails – Data Insertion Metrics – A Study


With the availability of lots of options to choose from the cost effective hardware in cloud environment, the storage has become so easy now a days. Once the storage is cheap, the immediate requirement for any software solution is to write an effective code to consume and expose the data. Agira team met a similar situation with one of our assignments last week.  The solution demanded uploading of  a very complex CSV data into an ETL Database. Improved performance was the goal and we started exploring the possibilities of developing the piece of code in Ruby on Rails and Golang.


On the Rails side, we wrote the code on Ruby and executed the upload action using sidekiq jobs. Our good old concurrency bottlenecks of Ruby language hit the performance and the time taken to complete the job was not satisfactory. To handle the situation, we wrote the piece of code in Golang which does the similar task. On the developer’s laptop itself we could see the better performance of the Golang code.

Technology Bundle:


  • Ruby – 2.3.
  • Rails – 4.2.0
  • PostGres Gem – 0.18.4
  • PostGres DB – 9.3.11
  • GoLang – 1.5.3


Ruby Code Snippet:



GoLang Code Snippet:



Cloud Setup:

We wanted to do an extensive testing, so decided to have a cloud environment in AWS to test the performance in terms of huge data volumes.
The following AWS boxes configurations were considered for running the volume test:

Instance TypevCPUMemory (GiB)Networking PerformancePhysical ProcessorClock Speed (GHz)
c4.xlarge47.5HighIntel Xeon E5-2666 v32.9
c4.2xlarge815HighIntel Xeon E5-2666 v32.9


Record Set Sample:


ColumnData 1Data 2Data 3
Data 4Data 5



The code has been executed against 100k, 500k and 1million record sets. The time taken to update the records in database are captured from the log records. Look below for the time taken in AWS for different volume of record sets for the Golang & Ruby code snippets:
Ruby vs Golang Performance-Metrics | AgiraTech

Code Reference:

The complete code scripts and the sample data used are available for your knowledge at the Git repository: https://github.com/agiratech/go_vs_ruby_metrics


On the considered scenario for study, to upload records into ETL database, Golang code performance is better than Ruby code.

We at Agira, always believe in suggesting the best possible solution to our clients. Here too, our team expended it’s technical knowledge, suggested required technology stack for the product/application development to the clients for improved performance.

We offer Golang development services for building world-class enterprise apps. We have expertise in building most complex software solutions using Google’s Go language. Chat with us now and hire golang developers within 72 hours.

Turn your vision to magnificent reality With
Our Web and Mobile Solutions
The following two tabs change content below.
Agira Technologies
AgiraTech is a technology company whose business services and domain solutions supports global clients who comprise the current world economy. Services we offer : Web development, Mobile App development, Blockchain, IoT and DevOps Consulting

2 thoughts on “Golang Vs Ruby on Rails – Data Insertion Metrics – A Study”

Leave a Reply

Your email address will not be published. Required fields are marked *

Join our 30,000+ subscribers, never miss out anything on our latest blogs, tips, tutorials, updates & more.