Use Azure technology to increase turnout for U.S. presidential election
One of the most exciting experiences in EastBanc Technologies history was the collaboration with Microsoft and Bing on the Polling Place Locator project , a cloud-based Azure application that helped 6 million Americans find polling stations on November 6, 2012 . On this day, two historical events took place - 1) Barack Obama became the second time President of the United States of America; 2) our application withstood a huge load of 1.5 million unique visits and 6 million API requests in one day, during which the Polling Place Locator appeared on every page of the American Facebook segment, on mashable.com and on the websites of several presidential candidates.
Newspaper Los Angeles Timescalled Polling Place Locator “perhaps the most useful polling place search tool , ” and CNN talked about the prime time app .
The story of how EastBanc Technologies has contributed to the development of American democracy, read on! Under habrakat, we talk about the technical implementation of the application, the use of Windows Azure in heavily loaded applications, and how the application worked, and how we made it so that it
Why is it difficult to find your polling station in the States
In the United States there is no institute of registration, migration flows within the country are monitored through a driver’s license, social cards (ID) and payment systems. A US citizen can vote in one of the specific places near his house, and he is required to present an identity document (and specifically which ID or driver’s license is individual for each state) and any proof of his residence on this site, for example paid utility bill.
All this can create a certain confusion (everything is simpler with us - we can vote only in one place, which our registration determines for us, and only upon presentation of a passport). In the United States, you would have several such places, and polling stations can be located in supermarkets, schools, or even just on the streets.
How to ensure turnout with such a complex system
To American voters do not strayed and always brought with them the necessary documents, at the initiative of non-profit organizations pripravitelstvennoy Pew in 2010 by EastBanc Technologies with the support of MSN and Bing was created service Voting Information Project(VIP), designed to make information about any state and municipal elections (whether it is the election of a president, senator or sheriff) more accessible. With the help of VIPs, citizens have the opportunity: having scored their address in the search bar, get a route to all polling stations defined for this address and find out the time of their work; read information about candidates; find out what documents you need to bring with you; get contacts of administrative workers in charge of the sites; work with the application in one of the 50 proposed languages, including exotic ones such as Haitian, Creole, Tagalog, Hindi and the language of one of the Chinese nationalities - Hmong.
The way to the nearest polling station
What documents with what content to present
Confirmation of address with a gas bill
VIP has proven to be an effective tool that has helped millions of people fulfill their civic duty with a minimum of hassle and confusion. This can already be judged by the statistics of 2010, when more than 300 websites posted a VIP widget, which collected 20 million views and about 7 million cases of a search query.
In the “peaceful” years, VIP worked under quite a normal load. The most interesting moment came when the whole country of America gathered for the elections globally ...
What have we done so that the application does not fall under tons of requests
When developing the application, the following ingredients were used :
- platform - Microsoft Azure
- web protocol - OData
- UI implementation - on knockout and ASP.NET MVC
- API Scaling Solution - APIPhany
- iron - 90 cores and 127 databases.
From the customer (Pew) we received data in the form of exml, which were uploaded to our database.
Especially for the efficient upload of feeds on ASP.NET, an MVC application was written in which URLs were reloaded once per hour on a schedule.
First, in test mode, in order to spread the load across the bases, we divided them into 4 regions - Middle East, West, South, Northeastern States. When switching to combat mode on November 6, 2012, the number of bases was increased to 127. They worked like this: one base determined which state the request came from and switched to the one that was responsible for that state.
For example: the user means that he lives in the city of New York. A request is sent through the OData server to the main database, which determines what kind of staff the city has and gives out the data of the New York base - they say bring the documents so-and-so, you can vote at such-and-such addresses.
In this intense mode, the application worked until November 7, 01:00 a.m. Washington DC. Then we turned everything off, returning to normal life and, finally, after drinking a well-deserved
Ambula and immoral
On November 6, 2012, 6 million voters from 50 US states almost simultaneously used the Polling Place Locator application - 99% of the traffic came from Facebook, 1% from mashable.com and candidate sites. Up to 20 GB of data was downloaded from each state.
The application searched through various data formats . To work with addresses supported:
- Unformatted user input
- Bing request format
- internal format in government databases.
At the same time, the server never fell, and the search time was literally a split second! And in general, there were no special excesses: of course, complaints came to the support, but they were quickly resolved by the Washington side , in general, everything went almost without gray hair in the hair of all participants in the project.
Why was Azure perfect for our goals?
Firstly, we did not have to buy large capacities in the form of servers, licensed software, and then also install all this. We just paid for the number of users, as well as for using the cores and databases for 1 day, and as soon as the need for capacities disappeared, we returned to normal mode. At the same time, we immediately got a wide channel, and did not have to host anything.
What we would like to emphasize especially: on the way of life, in conversations with applicants, in press releases of various IT companies, people often met who said: “We made an ASP site and deployed it to Azure. Therefore, now call it Azur! At least three people come in there a day. ”
With all due respect, this is a fallacy.
A solution becomes really “openwork” only when the number of requests to it grows to such that no server can physically withstand this, the Azure infrastructure itself starts working and scaling begins. You will not find a precise definition of the load at which the system becomes heavily loaded. Empirically, we found out that this happens at a time when the number of requests falls peak on the system more than one (even the best and most expensive) server can handle.
But the most important thing that we received as a result of this project:
- We found out for ourselves that Azure in the conditions when it is necessary to accept a huge stream of requests inexpensively and for a finite period of time is an ideal thing.
- Participated in the 2012 U.S. presidential election and helped people optimize their civic duty.
- They cut down fame in their small homeland ( here , here and here :).