How Onix moved the complex application from Heroku to AWS
Migration from Heroku to AWS quickly and with minimal effort
This case study highlights how we've assisted our client in migrating their application from Heroku to Amazon Web Service (AWS) to ensure greater app capacity and flexibility at a minimal cost.
Business context
Heroku appeals to small startups whose primary goal is to launch and start working fast. However, as companies grow and their needs become more complex, migration from Heroku to AWS becomes increasingly relevant.
Although Heroku is customer-centric, it has limited control over server configuration and can be more challenging to configure for complex applications. Programming Languages Heroku supports and environments are also limited. If it doesn't support the runtime management or different components deployment that the company wants to use, there's little choice but to migrate the application to AWS. AWS's flexible configuration and various services make migration more attractive for customers to create sophisticated, robust, and cost-effective infrastructure.
Our client asked Onix to help with the migration of his Ruby on Rails (RoR) application from Heroku to Amazon Web Service (AWS). The Heroku to AWS migration was motivated by the developing app's requirements for increasing capacity and flexibility with a minimal cost. It was a production app without testing servers, so there was no room for mistakes.
Our team needed to
Migrate from Heroku to AWS and ensure that the application’s performance was improved or was on the previous level. Also, there was a rapid increase in the possibility of infrastructure management.
Looking for a reliable DevOps services company?
Why we offered our client to move their app from Heroku to AWS
Initially, our client’s app was running on Heroku. However, as traffic increased, the project began to experience issues with environmental limitations.
01
Problem – Performance
The biggest problem is the poor experience of Dynos’ server resources usage. Each dyno is limited in CPU performance and memory resources. Heroku runs multiple dynos on a single Amazon EC2 instance. Heroku’s configuration plans strictly relate to the structure of server resources, and these resource limitations are significant and justified. All configurations are different, and each requires an appropriate CPU/memory usage profile. Customers who upgrade their plan to increase memory have to pay for the extra unused CPU power. When you need to scale your application, the general cost can increased significantly.
02
Problem – Control
Heroku requires the installation of special software that can be challenging to use. It is possible to connect to dynos via SSH but with a lot of limitations, full root access is blocked.
03
Problem – Reliability
There were reliability issues related to the application. Heroku does not provide a significantly rich level of management of the environment. This can lead to inconvenience for clients and developers.
04
Problem – Cost-effectiveness
Generally, Heroku has become more expensive and more challenging to maintain. Overcoming these challenges made it necessary for the company to leave Heroku and find a new hosting provider.
How AWS solves these issues
Scalability
AWS offers better scalability options and can handle more traffic without sacrificing performance. This is especially important for applications with rapidly growing user bases.
Convenience
Switching to AWS may be more convenient if you host other cloud services on AWS and want to keep everything in one place.
Reliability
AWS has a proven track record of uptime and reliability, which can help ensure that services are available when customers need them. This can help improve customer satisfaction and reduce lost revenue due to downtime
Cost
AWS offers competitive pricing and a pay-per-use pricing model, which can help save money by eliminating the need for expensive hardware investments and reducing IT costs. While on Heroku, apps run in containers called “dynos.” Only one service can run on a dyno. Additional dynos cost $25-50, meaning your bills will increase if your workload grows to the point where you need multiple dynos.
Flexibility
AWS offers a wide range of services, tools, and integrations allowing customizing an infrastructure to meet unique business needs. This can help you achieve greater operational efficiency and improve customer experience.
Location
Heroku caters to four or five regions, whereas the AWS cloud covers 81 access zones in 25 geographical regions around the world, with announced plans to create another 21 access zones and seven more AWS regions in Australia, India, Indonesia, Israel, Spain, Switzerland, and the United Arab Emirates (UAE).
Migrating to AWS offers greater flexibility, scalability, functionality, and cost savings than Heroku.
How we held the migration process
Our solution
Rather than expending excessive time and incurring cost setting up dynos, we deployed the application in AWS Elastic Beanstalk using Docker and easily scaled it.AWS is the go-to solution: virtual server instances come in various CPU and memory configurations, have full root access, and offer better performance management than Heroku.
01
Choosing Docker to accelerate migration
The migration of working applications from Heroku seemed like a daunting task. Fortunately, Docker technology helped to speed up the migrating process to AWS. It allows for packaging the application with all dependencies in a container environment that can run on any Linux system. Once built, Docker containers can run anywhere. Docker containers encapsulate the Linux virtual file system, providing much of a virtual machine's portability and isolation. The main difference is in the size of resources. As a result, these lightweight containers can load in minutes. We were confident Docker would be vital to speed up the migration to AWS.
02
Costs optimization
Our specialists compared the costs of using AWS and Heroku. Heroku costs around $800 per month. We calculated that using the same capacity on AWS would cost $600-650.Migrating to AWS and monitoring the load, we've reduced the capacity of servers and services, cutting costs by nearly $200 per month. We also developed a chart of the application and interactions with all services.
03
Configuration
Further, we wrote a configuration called Dockerfile. It resembles bash and it is easy to understand. Docker images are based on specific parent images and stacked in layers. As a best practice, we recommend using only official docker images to ensure that there is no malware inside. Using official docker images is not a guarantee of their security. It is recommended to use additional software to scan already built images for security vulnerabilities and to check all of them to avoid any unexpected issues in the future.In our RoR application, the main task was to install dependencies and configure the complex software components in our stack. That was a tedious trial-and-error process, but the ability to test everything in a local environment was a huge advantage.Deploying a new application in Docker didn't take much time. When Ruby had to be upgraded from version 2.3.3 to 2.4.10, the transition took no more than an hour, dispelling any doubts about Docker.
04
Environment configuration
The second thing to do was to configure the environment in AWS. To save time, we decided to use Elastic Beanstalk, which comes with different versions of built-in Docker. Dockerization was simple and mainly consisted of creating a Docker image from code in the repository. The basis of the app's Dockerfile was also used for the dockerization of the worker (sidekiq).
Core technology stack we used
Docker,
AWS,
Elastic Beanstalk,
Elasticsearch,
RDS Postgres,
Memcached,
Redis,
Amazon S3,
Load balancer,
Cloudflare,
WordPress
Results
The Onix team helped our client to move their application from Heroku to AWS smoothly and successfully. This resulted in improved server performance and better management of the infrastructure in a short time.
The robust and promising Docker technology was the key reason we switched from Heroku to AWS quickly and with minimal effort. In the new Docker and AWS-supported environment, we achieved greater flexibility and productivity compared to the environment that worked on Heroku. Servers no longer require manual scaling: they are automatically adjusted to the rise and fall of the loading of the memory or CPU. We also decreased hosting bills. The new level of management, such as SSH login is now easier to detect and resolve issues with the application.
Value delivered
Enhanced server performance
Cost
optimization
Better control over the infrastructure
Increased environment flexibility
See other related projects
Fintech
Decentralized cryptocurrency blog with
Polygon integration & MetaMask support
Web3 blog with secure & transparent transactions
Decentralized cryptocurrency blog with Polygon integration & MetaMask support
Services provided:
Onix provided end-to-end services including tokenization, efficient transaction handling via the Polygon network, and scalable architecture design
Israel, Tel Aviv
Advertising
Unobtrusive SaaS product
for setting up marketing campaigns
SaaS marketing product for growing web conversion
Unobtrusive SaaS product for setting up marketing campaigns
Services provided:
We delivered a solution with customizable lightbox creation, real-time event tracking, seamless integration & AI-powered tailored product suggestions
USA
Fintech
Decentralized app for crypto
enthusiasts & investors interested in
the NFT sector
Cryptocurrency platform to transact with ethereum
Decentralized app for crypto enthusiasts & investors interested in the NFT sector
Services provided:
Onix developed a user-friendly trading platform for lending protocols and loans, with multilanguage support, real-time updates, and personalization