About the company

Hacktory is an online cybersecurity learning platform. Training courses are developed by a team of experienced InfoSec specialists. They focus on building practical skills on their interactive platform. The target group includes a wide range of IT experts (infosec specialists, developers, admins, test engineers, and layout designers) who want to know more about secure programming and explore new ways to find vulnerabilities in code.

We need to reduce latency

Hacktory professionals were involved in remote learning before it was a global necessity. The platform was created a year ago and has used cloud technology since its launch to provide users with isolated access to their own infrastructure. This is convenient because workloads are intermittent: when training is underway, up to 300-500 instances are required per 100 users.

Each platform user is provided with their own isolated virtual environment, including a workstation and a set of VM instances. Minimum latency has always been a critical indicator of platform performance. The lower the latency, the more comfortable it is for a user to use a workstation and the higher platform usability is overall.

We initially used AWS for everything, but we couldn’t always guarantee the quality of service for Russian users. For starters, there were risks associated with claims from Russia’s communications watchdog (Roskomnadzor) against foreign providers. Moreover, the configuration lent itself to high latency.

The problem got worse in the winter of 2020: the platform earned good reviews in the community and traffic increased by 30%. We received a lot of new users between the ages of 18-35 who wanted to either do web security or grow to middle developer. It got harder to work. It even happened that the service failed to start every other time. We decided to look for a Russian cloud provider to avoid AWS vendor lock-in and build a distributed system.

Yandex Cloud Boost from Yandex Cloud

The Hacktory team came to realize that most well-known cloud providers don’t provide infrastructure in Russia. So, the first absolute advantage of Yandex Cloud was that there servers are located in Russia. This makes platform access much faster than other cloud providers. Its API is also compatible with the other cloud systems that Hacktory still uses, so migration was easy.

And this isn’t even the full list of advantages. The Hacktory team joined the Yandex Cloud Boost program and received a grant of RUB 200,000 (approximately $2700.00) from Yandex, which proved useful during migration.

Put everything in folders

The Hacktory service actively uses cloud platform APIs (virtual networks, creating and configuring VMs, and so on), and Yandex Cloud provided everything we needed. Implementation took two months.

During the migration, we learned that there’s a limit on the number of concurrent operations per folder when deploying Yandex Cloud instances, which also limits the number of users that can connect to the Hacktory system at the same time. However, we found a solution: we created several folders that were distributed across data centers and wrote a launch balancer to evenly distribute tasks across the folders. Since there wasn’t a PHP library, the Hacktory team members worked with the API directly, referring to the detailed documentation. And they noted that the Yandex Cloud API is much more user-friendly and better documented than that of the GCP.

We should point out that we didn’t have to involve additional outsourced or in-house experts to carry out the migration.

Time to reduce costs

We successfully migrated all users residing in Russia and CIS countries to Yandex Cloud, and built a fault-tolerant geo-distributed system where one cloud backs up another.

The latency indicator decreased from 30 ms to 5-6 ms, and thanks to the new provider and lower costs, the Hacktory platform was able to reduce the cost per user by five times. What’s most important is that it’s now easier to work with the service. The speed that lab machines are accessed now in Russia is so much faster that you don’t feel the difference between your computer and remote desktops. The low latency between the user’s data input and display of characters lets them do labs with maximum comfort and without wasting any time. VM instances and private networks are quickly minimized, so users don’t have to wait for long and can immediately proceed to other assignments from Hacktory.

The Hacktory team can now focus on developing the educational component of the service and prepare assignments for programming in various languages.

Opinion

Ivan Yushkevich,
СТО at Hacktory
Ivan Yushkevich,
СТО at Hacktory

Yandex Cloud provides everything you need to migrate your infrastructure, implement projects in the cloud, and bring your ideas to life. One of the main advantages is the documentation, which is easy to navigate and use, and the intuitive interface, which doesn’t look like something you’d find in a spacecraft. I’d also like to note that Yandex Cloud offers a very helpful program called Yandex Cloud Boost. The large grant makes migrating to Yandex Cloud much more comfortable compared to other providers. Thanks to the grant, we could move and deploy in Yandex Cloud with the scheduled time frame and test its functionality.