How an AI startup improved application availability and optimized AWS infrastructure costs

Objectives

One of the main objectives was to ensure high availability of the Blockade Labs application using EC2 instances on Amazon Web Services (AWS) cloud. Key components of the project included transitioning to new technology and setting up new staging and production setups with a focus on enhancing cloud architecture and PHP configuration, as well as optimizing costs on AWS.

Results  

  • Improved application availability was crucial for Blockade Labs, which guarantees its users a generation of complex, immersive panorama views in just a few seconds. Server downtime issues were eliminated with optimized PHP configuration, which balanced memory and CPU usage effectively. 

  • Adequate infrastructure optimization also provided financial benefits: a 30% cost savings across AWS consumption.   

Focus on High Availability   

  • With a growing number of users and therefore, demands for high availability of its AI-based applications hosted on AWS, Blockade Labs set out to address infrastructure challenges (by adopting new technologies), improve configuration within EC2 instances, and ensure optimal application performance, even when server is facing overload and surge in demand.   

  • Although they attempted to resolve issues internally, the complexity of technological challenges led them to seek an external partner. Leveraging experience in delivering well-architected infrastructure solutions and expertise in achieving high availability in AWS environments, Mainstream team proposed a solution to transition from the current to the desired infrastructure state.

Current state 

During Mainstream’s engagement, the client used an Apache web server that couldn’t handle the many client requests. They also utilized an outdated PHP version (8.0) that needed updating.  

One of the key project goals was to enable scaling (increasing and decreasing the number of instances) for optimal application performance at all times. 

Our Solution 

  • The first step was transitioning from old to new technology. The Mainstream team optimized the PHP 8.2 configuration, and Apache configuration was migrated to nginx configuration files, which suited the higher number of connections the client experienced with the application.  
  • In the second phase, we implemented an Auto Scaling group service with a load balancer on AWS. This service allows the system to dynamically scale by expanding or reducing the number of EC2 instances. After setting up and verifying the staging setup, we proceeded with the production setup using the Auto Scaling group service and load balancer, with a maximum capacity set to 5 instances. 
  • We identified inadequate PHP configuration as a cause of server downtime. The S3 bucket was overloaded with images generated by users, and the cache was not being cleared, which burdened the number of PHP threads defined in the PHP pool on servers. Our team implemented proper configuration and achieved a balance between memory and CPU usage by the server.   

Cost Reduction as an Additional Benefit   

In addition to the abovementioned advantages such as high application availability, we achieved 30% cost savings across overall AWS usage. This saving was achieved based on data optimization approaches, such as optimizing access to S3 objects through CloudFront distribution and Redis optimization.

We cooperated with Mainstream’s public cloud team on modernizing and optimizing our AWS infrastructure to achieve higher availability and cost-effectiveness of our environment. The team is seasoned and proactive, so we are very happy with the results, including the 30% savings on AWS monthly spending.

Miloš Gačanović

CTO @ BLOCKADE LABS

Discover how Mainstream can improve your business.

Contact us at sales@mainstream.eu or fill out our contact form.

Other case studies

Designing and building a hosting solution for an advanced e-commerce

How Gigatron, a leading e-commerce operator, achieved IT infrastructure stability, scalablity and security with Mainstream Managed Hosting.

Web platform modernisation: Stabilisation, Scalablity, Reliability

Halo Oglasi’s road to IT modernisation   Halo Oglasi had an old application that was maintained by an external partner and

Intelisale: Migration and management of Microsoft Azure subscription

Intelisale, the developer of an advanced B2B omnichannel platform, relied on Mainstream’s expertise for the migration and management of Microsoft Azure subscription.

WAIT!

Don’t leave without the latest tech & business insights.

Receive Monthly Updates from Industry Experts

*No spam - just quality content