We had to create a robust scaling system to handle the elasticity of the product and support future growth. The first step was to migrate the platform to Amazon Web Services (AWS). We configured Elastic Beanstalk (EBS) to scale the servers up and down based on the traffic and throughput of the application. We also did some optimization of assets, added a CDN, and worked on horizontal scaling and database replication.
The next step was to build a more intelligent auto-scaling system that could react to auctions as they close. One of the biggest bottlenecks of the platform was the closing of hundreds of timed auctions within a short period. The client also needed a custom-built auto-scaler to address the huge spikes in traffic that frequently occurred.
Our system would recognize when an auction was closing and begin to scale up servers in anticipation of the load. Based on the number of registered bidders and lots, the auto-scaler would automatically spin up as many servers as was appropriate to handle the thousands of requests per second. If multiple auctions are closing at the same time, it would anticipate this and spin as many servers as needed. While the platform typically ran on four servers, it would scale up to 60+ servers to handle days when lots of simultaneous auctions were closing. After the auctions ended, the auto-scaler would scale everything back down.
The next step in building a platform that could scale was redesigning the bidding interface. The old interface was slow, clunky, and inefficient. We rebuilt the interface as a Single Page Application (SPA) using Ember.js and built a new backend API. The old interface used HTTP to update bids and would handle “real-time” through polling – which is checking for updates from the server on a timed basis. In the new interface, we used web sockets to create a true real-time connection between the browser and the server. As bids changed, it would immediately update the price on every browser connected to it. Using web sockets drastically reduce the load on the server since the browser wouldn’t have to ping for updates continually. The bidding interface was also built as a responsive web application, meaning that users could bid in real-time in their browser or mobile device. We saw a significant rise in mobile bidding throughout the next few years.
Moving the bidding system’s backend into an API architecture dramatically changed the speed and durability of the platform. Using Ember.js and an API reduced the server load times and page speed. To further improve performance, we created a caching layer into our API. This enabled the application to avoid inefficient queries and respond much quicker to cached results. The caching layer also improved the performance and speed of the bidding interface.
“LaunchPad Lab (formerly Kohactive) has been the best development team we've ever worked with, and we can't recommend them highly enough.”—Scott Finkelstein, CEO, NextLot
The infrastructure and bidding interface improvements had incredibly positive effects on the platform. Application downtime became a rare occurrence rather than a frequent event.
In 2015 alone, the platform handled more auctions, lots, and bids then all the previous years combined. By 2017, the system was handling over $2 billion in transactions and five million bids. The infrastructure became truly elastic, stretching from four to sixty servers to handle the load – all without dropping any bids.
To scale NextLot up to handle billions of dollars in sales, we took on the following deliverables:
- AWS Migration: Migrate the entire platform from Bluebox to Amazon AWS
- Auto-scaler System: a custom auto-scaler system to anticipate auctions and scale up as needed
- Bidder Interface: redesign and rebuilt the timed auction bidding interface as an Ember.js Single Page
- Application (SPA) using web-sockets
- Bidding API: rebuilt the timed auction bidding API to handle the new Ember.js application
- Caching: added a caching layer to improve performance and reduce server load
After the scale-up phase, we started to focus on refactoring old code and building new features into their growing platform. The scaling efforts continue to provide a robust foundation for continuous growth at NextLot.
Ready to Build Something Great?
Partner with us to develop technology to grow your business.