📜 ⬆️ ⬇️

How Dodo Pizza Delivers Pizza Using Microsoft Azure Cloud

We continue to talk about the use of the Microsoft cloud for solution development companies (ISVs). In this issue, Dodo Pizza is already an international network based in Syktyvkar, whose feature is the Dodo IP cloud information system , which is deeply integrated into all business processes of the organization and franchise. This article was prepared with the participation of several people, Fedor Ovchinnikov, CEO of Dodo Pizza, as well as the implementation team - Alexander Shibanov, Andrei Morevsky, Arseny Kravchenko and Gleb Lesnikov. Interestingly, while we were preparing the article, Dodo Pizza should already start working in the USA .






Fedor Ovchinnikov: Good afternoon! Our company appeared 5 years ago in Syktyvkar. This is a small town in northern Russia. Here we still have our headquarters , while the company has offices in Moscow and the United States. Today “Dodo Pizza” is an international network of pizzerias in six countries. In 2015, the network revenue exceeded 1 billion rubles . The main product of the company is a franchise, the core of which is its own information system Dodo IS. Our system is implemented in the form of a website. Franchisee partners work with it as a SaaS service. With the deep integration of the system and business, using the capabilities of the Internet, mobile gadgets in the kitchen, with the help of Dodo IS we achieve greater efficiency and transparency of business. In fact, “Dodo Pizza” is an IT company or a “cyborg company”, that is, it is both an IT and a retail company. But unlike 100% of IT companies, we sell to our customers, that is, franchisees. IT system with business system and brand. A key feature of our business is openness to customers, investors, partners. Openness does not allow us to work badly, since everything becomes immediately visible. Our cloud-based information system allows real-time display of key metrics of our business.
')
Dodo "IP" is the heart of the entire network. Today, more than 80 pizzerias in six countries, a single call center, our sites depend on it. And all this web! We even have a cash desk in a restaurant running in a browser. We were looking for the best solution in terms of reliability, quality, ease of maintenance. Physical servers are not a very flexible solution, plus some services have already been virtualized through Hyper-V, so the cloud was a logical continuation of the development. It was not terrible - it's just a virtual machine, they have nothing to fear. On Azure, the choice was largely due to the participation in the Microsoft BizSpark start-up support program and the BizSpark + Cloud Grants as Azure resources for $ 60,000 - yet, you need to touch the cloud in order to understand whether you need it or not.

In this case, of course, the cloud is primarily a tool. Business must set tasks, and we, in turn, must solve them. A good tool allows you to make better decisions. The flexibility of the cloud allows you to make more, better, come up with many options and try everything. If we talk about the consequences of the transition, then at the transition to the cloud, we rather saved than spent. We spent several dozen man-hours of one sysadmin, and in return received a year of free work of servers. I don’t think what else is possible.
In 2016, we plan to increase the network to 180 pizzerias, our goal by 2020 is to open more than 2,000 pizzerias around the world. Now open pizzerias in the United States and China. All of them will be interconnected via our Dodo IS information system, that is, through a web service. The more pizzerias we have, the greater the role of our web service Dodo IS for effective management. At the same time, we will still depend on a “cloud” on a large scale.

It must be said that it was very difficult for us to begin. But this concerns any startup, in our country the situation was aggravated by the fact that we were in Syktyvkar, far from the “venture” money and technology centers.
The main problem for the business could be downtime and / or data loss. Something could be sharpened by iron servers. By itself, relocation is always a big risk. But the expectations were more than justified, now we are satisfied. There were no problems for business, all our initial difficulties had no effect on business and users. The cloud is, first of all, excellent scalability. We are growing very fast, we open pizzerias in Europe, America and China, the clouds enable us to conveniently deploy the system instances.

What is DodoIS made from ?



Web application on ASP.NET MVC, Windows Server, IIS, CentOS, NGINX, MySQL (Percona Server). We use NGINX for reverse proxy and TLS. Behind NGINX are our backends in the form of IIS servers, on which business logic resides. Percona Server works as a relational database. For a variety of production caches, we use the Azure Redis Cache. The applications themselves are written in ASP.NET.

What is used in development ?

Visual Studio, ReSharper, Bitbucket, JIRA, Confluence, TeamCity, Azure Application Insights. Programmers work in Visual Studio 2015 with ReSharper.

For version control, we use Mercurial (Bitbucket), JIRA for tasks, Confluence for documentation. Deploy through PowerShell once a week, Continuous Integration - TeamCity. We actively use Application Insights for two things - load ratings of different backend API and failed requests / exceptions, however, our application generates too many events and we select their monthly limit in 5-6 days. Soon we will do Sampling and this will cease to be a problem. Typical use case - when we see an unusual load on backends / base, go to AppInsights and look at the most frequent requests. Another typical use case is when something slows down for no reason, we filter by URL and look at the query execution time, and this is absolutely without rewriting the application, i.e. we just add the AppInsights monitor to the server

Architecture

Our system is conventionally divided into two parts: one part is back office - everything related to pizza production, reporting, personnel, etc. These are employees of 80 pizzerias and a management company.

The second part is our customers who interact with the system through the site. At the moment, the site takes more than 40% of all orders and serves ~ 6,000 unique visitors per day.

We planned the architecture from the very beginning. There was a fear that the project would be highly loaded and a monolithic solution (even if broken down by layers) would not work. But, taking into account the high risk of a startup and limited funding, we still decided to make a monolithic architecture with standard layering (UI, BL, DAL). This is a clear architecture, with a low threshold of entry and it gave us the opportunity for rapid development. Over time, based on the needs of the business, the architecture evolved several times, but in fact remained a monolith.

Now we are preparing a system for future growth, namely for clusters. We started to use Redis Cache, we will soon make a farm of IIS servers. We also plan to switch to Percona XtraDB Cluster and translate the statics to CDN.

What happened? First migration attempts

We simply created several virtual machines, repeating our previous servers. Removed NGINX-reverse proxy, believing that they do not make sense. Thus, it practically did not differ from local servers in the data center. The servers were installed on the same number of cores as they were, they worked perfectly. Part of the machines that already worked under Hyper-V, we very quickly dragged and copied the image without any problems.



Difficulties and inconvenience

The old portal was uncomfortable, the new one is much better. Did not know the specifics of the Azure Storage magnetic disks. Balancer broke off old TCP sessions, our application was not ready for this. Initially did not use virtual networks. There was a lack of entry-level manuals, such a FAQ for switches from iron to clouds, like “if you migrate to the cloud, remember that ...”. Available manuals were dated 2012-2013, which often did not fit into the new realities.

findings

In our industry, cloud-based solutions, native Windows applications, are commonly used. We believe that this is not the most effective approach, for example, McDonaldsa new versions of software appear every six months.
The main conclusion of our migration is that for a fast-growing business, the public cloud is ready to offer for any demand. It also became clear that we are unlikely to go to physical servers. I think it is meaningless for Habr to talk about the benefits of clouds, the most important thing is that we are satisfied and the business has no difficulties.

Passage about collective work: Fedor Ovchinnikov, Alexander Shibanov, Andrei Morevsky, Arseny Kravchenko. Interviewed by Alexander Belotserkovsky .

Source: https://habr.com/ru/post/277821/


All Articles