
Friends, I want to tell you the story of the development of the project
president2012.ru . The site is the leader in terms of the presidential elections in Russia, for 3 months it was visited by about 2 million people, had up to 20 thousand visitors online and more than 1 million hits per day, 3 cloud servers were involved.
There are so many interesting moments in the process of working on a project that I cannot hold this knowledge in myself, and I want to share it with you. I understand that much of what I am about to talk about is already described more qualitatively in specialized sections, and I will not reveal anything new. My task is rather to convey the atmosphere in which the work on the project took place through individual nuances. And also for the millionth time with the help of the success story to show people like me that everything is possible and everything is in their hands.
Who might be interested? Anyone who is somehow involved in the creation of thematic websites and expects to work with high-loaded projects.
I hope the political excitement is enough verse, so that readers can appreciate my article without influence from their political affiliation.
')
I will lead the story in chronological order.
Prehistory
It all started in February 2010, when, at our local forum (I live in Kemerovo), I ran through the news that the former owner did not renew the domain president2012.ru and it was put up for auction. Without hesitation, I took part in the auction and, lo and behold, was the only buyer with a total price of 100 rubles!
Until April 2011, there was a stub on the domain in the form of a list of potential candidates, which I just basicly promoted at requests of the “election 2012” type. In March 2011, I ordered the development of my programmers and designers (I’m the director of a webstudio and a couple of IT companies), and on April 6, the site was released "at will." The main functionality is the pages of candidates with their descriptions, programs, etc., as well as the rating of these candidates according to the results of voting of visitors. Secondary content - aggregated by topic news, articles and videos (with the obligatory indication of the link to the source and compliance with the requirements of this source to copy materials). A content manager was hired to aggregate content and moderate user comments.
Warming up
The reaction of Internet users was not long in coming, every month the number of visitors doubled, and by August 2011 the total number of comments reached 2,000 and the problem of spam / flood / flames arose. Until August, commenting was anonymous with captcha. I didn’t want to lose such a great source of UGC, so to make commenting as easy as possible for visitors, I chose
Loginza , which makes it easier to work with the social networks and various services authorization API. I will not describe here the complexity of its integration into the site, but even with minimal knowledge of programming, this is just a matter of a few hours.
On the same day, the number of comments decreased several times, especially since commenting was no longer anonymous and had theoretically more responsibility for my words. But after a few days, the visitors tasted the innovation and commenting volumes returned. For me, the moderation task was simplified, and the quality of comments, meanwhile, improved. Of course, the closer the election date was, the more commentators went beyond all imaginable limits, and more flexible moderation systems, mass deletion of messages, a mass ban of clones, etc., had to be done.
Voting
A separate description deserves the voting process. Supporters of candidates used every conceivable way to cheat votes: substituting referrers, user agents, etc., they sat for days on recognizing captchas, using a proxy server, even using TOR. As a result, the only easy way to limit their zeal was to confirm voice confirmation via SMS. After all, getting a large mass of mobile numbers is much more difficult than changing the IP or registering a new account in social networks.
There were two options to choose from:
- After clicking on the “Vote” button, offer to enter your phone number and send SMS to it with a confirmation code, which in turn is entered in the adjacent field. Minus this option - while maintaining the speed of voting by visitors (several thousand votes per day), I simply could not cope with the budget burden, because for each outgoing SMS would have to pay. But, nevertheless, the dispatch service market has studied and found two of the cheapest and most convenient options: smspilot.ru and sms24x7.ru . Both allow you to send SMS no more than 30 kopecks apiece and with an arbitrary name of the sender, for example - the name of your brand.
- The second option is to give the voter a unique code that must be sent to a short SMS number to confirm your vote. The main disadvantage of this method is the payment of sent SMS, which deters many voters. On the other hand, this method does not reduce your budgets, but, on the contrary, allows you to offset part of the costs. I tried to minimize the expenses of the voters by choosing the cheapest short number with an SMS cost of about 3 rubles. Plus he carried out “explanatory” work on the voting page, describing the reasons for choosing such a method, plus promising to send part of the proceeds to charity. Now, by the way, I am choosing an orphanage in my city to fulfill this promise.
Here I was waited by the next rake. Initially, the
A1Pay SMS service was
chosen , but at a certain moment they, apparently, frightened of something, covered my service, “warning” about this with a ticket in their interface on Friday evening (!), With no notification by mail, etc. . The message was:
Please urgently remove our numbers from the website president2012.ru. If the numbers are not removed during the day, we will block the root prefix and your account.I found this ticket on Sunday evening, when the vote counter had not been changed for a long time, and hundreds of people sent their SMS “to nowhere” to a blocked service. I was unable to reach the “round-the-clock” technical support within a few hours. A long correspondence with A1Pay's “security service” only managed to achieve this explanation: “We are an apolitical company and do not work with such resources.”
I had to pick a new partner. In the process of this selection, I came across the fact that the majority of mobile payment operators are "sharazhki" with disgusting technical support and the lack of all guarantees. So, for example, Smsbill.ru advertised on crontendzhins gave me "Service failed verification, information: icq xxxxxx". When contacting the specified ICQ, I received a response in the style of “Did you receive the consent of the
presidents ?” And “We do not work with such
gray sites as yours”. A person from “technical support” automatically enrolled me into “unworthy”. Well, okay, I found the operator who, after a round of negotiations, agreed to start my service,
smsdostup.ru . After that, there were no problems with voting.
I must say that with the introduction of SMS-confirmation, the number of votes decreased several times, but their quality increased by an order of magnitude. The quality can be seen by time, geographical, numbering. It is seen that the voting began to occur more evenly without distortions and markups.
Success and its fruits
And meanwhile, growth continued. Any political event led to a surge in attendance. Links to the site in social networks periodically led to a viral wave. A vivid example is the wave that began after I published the program of candidate
Peunov Svetlana Mikhailovna . On that day, my site got to the top dirty.ru, vott.ru, pikabu.ru, onliner.by, nigma.ru, leprosorium.ru, blogs teh-nomad, exler.ru, got 400 links from twitter, hundreds of links from FB, VK, OK. And even Vesti
quoted me.
By the way, SMO-work on the site has led to an excellent dissemination of information throughout the network. The greatest effect was obtained, of course, from VKontakte, but the rest of social media did not disappoint. I especially liked Twitter, where up to hundreds of messages appeared every day with a call to vote. I tried to support the most promising discussions of my site, collected feedback, worked with complaints, etc.

Starting around December 2011, president2012.ru ranked TOP1 on almost all polling requests, both in Yandex and Google. By the way, about competitors: in the previous elections of 2008, the top site was
vibori.net , which I left far behind this time, giving them only a fifth of the possible traffic. The rest of the “competitors”, to my surprise, did not even try to become the first, did not engage in promotion, did not upgrade their websites to the emerging realities. So, many of them did not even update the date of the upcoming elections, when it was moved from 11 to 4 March 2012.
The growing traffic constantly led me to the fact that in December 2011, the
maximum rate at my hoster nic.ru ceased to meet the requirements of the site for RAM, and the hoster does not provide individual memory settings. Began periodic falls. I installed and configured ngnix to render static content. This reduced the load by 2 times, but after a few days it was already not enough. Transferred the site to the cloud
clodo.ru , highlighting 2GB of RAM and 4x2267MHz processor. Until March 2012, this was enough to hold out.
New obstacles
February 23, I received another step. Yandex launched its website
vybory2012.yandex.ru , putting it first in all search queries containing the word “election” and thereby violating its own rules, which Yandex translates to webmasters. With this action, they took about 15% of the traffic from me - a small share, but I did not want to put up with it. I wrote a
blog post to them , and in a day I was hit even harder on the pretext of correcting an error. This time, they removed their site from issuing a “broad” query “Elections”, but put it into issuance for a much more frequent set of queries with the words “Elections”, “candidates”, etc. I was not going to give up, realizing that this is probably just the initiative of individual members of the Yandex team. I wrote a complaint to Yandex accounts on Facebook, LJ, Twitter, wrote a letter in support of the search. And after a couple of days, justice prevailed. Yandex was the first to leave its site only for very narrow requests, and for the rest it “mixed it up” in issuing in non-first positions. By the way, after that I began to respect Yandex more.
On February 27, the fact that, according to the 19th Federal Law on the Election of the President, 5 days before the voting, the publication of the results of a public opinion poll was forbidden opened for me. Before me was a dilemma - or break the law, because in fact, my vote could be equated to such a poll, or close a significant part of the site in those days when people would actually look for this information on my site en masse. And I twisted! He stopped updating the rating, promising voters to update the results on March 5th, and he wrote everywhere on the site that the date of publication of the rating of candidates was February 27th. This was fully consistent with the requirements of the law, and the site could continue to work quietly.
In ecstasy
So, the official voting day came up. By March 3, traffic increased to 80 thousand people per day. I began to predict what the load will be on March 4th. The schedule of attendance of the site vibori.net in 2008 by extrapolation gave me a forecast of 200 thousand. visitors on election day. Then I did not know that this is a weak forecast and everything will be even more interesting.
On March 3, I maximally cached the CMS (MODx) with all the pages of the site (by the way, browser caching I had already been configured for a long time), increased the RAM to 3GB, and also delivered static content to a separate server and quietly went to sleep. Waking up at 11 am (MSK + 3) I found that the servers are already at the limit and need to do something. Fortunately, the site was on a cloud and I had ample opportunities for maneuvers.
First of all, I allocated the database to a separate server. It helped, but not for long.
Increased the RAM to 8GB and the number of processor cores to 8. Another hour of the site’s life was won.
And then Moscow woke up! It became scary, the number of online visitors reached 6000 and grew steadily. It is the turn of more fine-tuning ngnix. I never did this, but Habr was saved by a
good manual . Increased the number of work processes to 8 by the number of cores, the number of connections to 8 thousand, limited the connection time to 15 seconds. In the sum of changes in the settings, ngnix gave an increase in the speed of page returns by 2 times.
It was like a tag game. Each new portion of changes in the server gave an improvement in performance and automatically brought a new wave of visitors, again reducing performance.
My experiences on TwitterNext, set about tightening caching. The most visited pages that have rarely changing content are saved as html-files, completely removing php participation, and prescribed their issue in .htaccess. Inside, the site was increasingly moving away from the initial engine and turned into a coiled and cached frankestein. But such was the price of speed decision making and speed implementation.
At the same time he increased the iron capacity. By the end of the day, 3 servers of 8 two-gigahertz cores and 8 GB of RAM worked for me: a web server, a file server, a database server.
Then I discovered a large queue of long-running queries to the database. Began to optimize SQL for those pages that have not yet been so hard-cached. Some queries, such as counting the number of reads, were deleted altogether, in order not to waste time on the optimization of not the most essential functional. In general, at such moments, when every second is dear, the brain quickly realizes what is more important and what can be neglected. At the same time, I tuned MySQL, reduced the wait_timeout to 10 seconds, increased the max_connections to 1000. I had no complaints about the developers, because they were not tasked with a highly loaded site.

The beginning of each hour was accompanied by a sharp increase, apparently due to the fact that polling stations opened / closed in the next time zone and people went to look at the statistics (although I could only promptly show turnout percentages). And so, at the moment when the sites in the main time zone of Russia, Moscow, were closed, the server could not stand it and went down. At that moment the site was online about 20 thousand. person. I call technical support for Clodo, in an understanding and apologetic voice, I say that the server has died a brave death, and they answer me: “We know, this is our fault (!), We will fix it within 10 minutes.” I did not argue with them, and after 40 minutes the site came to life again. Not very worried, because I understood that I had already fulfilled and exceeded all plans, and I expected that the site would fall much earlier and for a longer period.
From the moment of restoration, the activity of the visitors began to decline and I was able to calmly update the news section and video, and after the voting in Kaliningrad was over, they uncorked a bottle of red wine and, together with my wife, celebrated the end of this wonderful day in my “election headquarters”. The feeling was that the president chose me. A mixture of adrenaline, dopamine and endorphins ran through the blood.

results
In the following days, attendance fell much sharper than it grew, and for the holiday stopped at around 7-8 thousand visitors per day.
Final project results:
During the period of active voting (3 months), the site was visited by about
2 million. personOf these, about
500 thousand - per day from 8:00 on March 4 to 8:00 on March 5 (MSK).
During the same day, about
1,200,000 pages were viewed.
For the same day of outgoing traffic:
0.5 TB .
Spent on the development and support of about
60 000 rubles . Of which: 33 000 rubles. for development, 8 000 rub. on a hosting, 19 000 rub. for content and other support.
Received from Google Adsense advertising about
190,000 rubles .
Experience gained:
invaluable .

Summary
The conclusions I made from this project:
- Event projects can bring good profit in spite of their brevity in time, razovost.
- It is important to work actively with social networks, both to stimulate UGC, and to increase the return on PR and SEO gain.
- It is important to keep track of all your competitors and always go one step ahead of them in offering convenient and useful tools to users.
- It is important to concentrate on certain details of your project and adjust the entire advertising campaign for them. So, my concentration was in the ranking and commenting process of candidates. I did not create a broadly political political portal.
- If you predict a growing interest in your project - prepare for this growth, so as not to find yourself in a situation when there is a demand for your service / product, and you are stupidly unable to satisfy it due to lack of resources.
- Well and most importantly - you need to have a clear structured plan of action for the project, covering all aspects of its existence and development, and then it remains to believe in your own strength and everything!
PS I look forward to your questions, feedback, criticism on each of the aspects of the project - from idea to technical implementation.
PPS Administration please do not consider this post as political, if the restriction on the policy still remains. I myself am apolitical person and tried to circumvent all sharp corners in the text.