Hola: principles of work

    One of the developers talked about where Hola startup came from , and first of all, about the technical aspects of the company's work.

    Background of Hola

    Suppose, in the average county-level city N, two providers coexist peacefully, and one of them (P1) offers its customers a connection prize: a barrel of jam, and a packet of cookies. Consequently, he has more clients than the second provider (P2). But the entire budget of P1 went to sweets, and the channel is not very wide and constantly loaded. And channel P2 is wide, but most often it is idle. P1, of course, is in no hurry to share his channel with P1 customers. As a result, we have a large part of the population with diabetes, inefficient use of the channel, caused by healthy market competition.

    Another situation. In one of the districts of the county town N, all residents without exception love cats. And they regularly watch themselves and share with each other links to funny videos on Youtube. It turns out that at the same time not only citizen Vasisualiy is dragging a rather large video from his overseas repository, but all the other residents of the neighborhood are doing the same. In the end: Youtube is forced to spend money on caching servers closer to town N, and providers on expensive traffic across the oceans. But it would be much easier and cheaper to get the video directly from Vasisualia!

    Perhaps it was the above thoughts that prompted two startups, who had recently sold their previous offspring - Jungo for a hundred lemons, and vowed to themselves not to work for more than a day in their lives, solemnly break this promise. And they created Hola.

    The origins

    At the heart of the Hol is a protocol based on HTTP, using which peers, playing different roles, communicate with each other. Traffic is encrypted and then archived using zlib, with one (not very documented) feature of which is a funny case. Over a fairly long time, here and there, the client suddenly broke all connections, made a muzzle with a brick, and generally behaved asocially. This rarely happened, and everyone diligently pretended to be that way. So far, after one of the updates, this phenomenon has not become widespread.

    When the patience overflowed, a raid was announced on the bug, which resulted in the following: in the zlib version number 1.2.5 with a very specific content of the input stream, an empty block was added to its end. Modification of the library from this lost faith in humanity and fell into depression, because of which the entire protocol collapsed. And updating the client code has led to the fact that the ill-fated sequence began to appear much more often. Crutches were fastened at an emergency pace to the server and patches were imposed on clients with wide ties. Well, at the same time, it was decided to update zlib to version 1.2.8, in which this feature was recognized as a bug and fixed.

    A little bit about hierarchy

    Hola begins processing any request from the browser by contacting her older brother, the server. From the point of view of the client, such a server alone is responsible for everything in the world. But in fact, he only forwards requests to the right address. For example, on a server responsible for authorization, or on a dating site, a server that helps two clients connect to each other, taking into account all their features. So, for example, if one client wants to join another, which does not have an open port, but the first one has such a port, the server will send the second command to join the first. Currently, connection methods are being developed when neither side has an open port.

    Also, in addition to clients, there are also many (really many) servers scattered around the world, playing the role of clients and having ports open for connection. Depending on the needs of the client, they can either simply forward traffic through themselves, or act as an intermediary in connection with another client. This may be necessary when certain services are actively banned by proxy servers based on a large number of connections from the same address (Netflix with Hulu also do this). And when inquiries come more or less evenly from all millions of customers, you won’t be a big deal.

    And finally - the most interesting and unexpected

    The fact is that Hola has the most extensive capabilities for diagnosing various problems, as they say, in the field (people who are more or less suffering from paranoia before knew that Hola is just a virus). One of them allows you to strictly specify a group of peers through which traffic from the developer client is chased so that specific problems are easily reproducible.

    One of the developers of Hola once noticed that his colleague is listening to music from the famous music service Pandora (which is blocked all over the world outside the United States). It turned out that if you take a group of peers residing in the United States, then the traffic will, accordingly, be chased through them. And to block it on the basis of the fifth column is impossible. Now the demand for a “side effect” even exceeds the need for an Internet accelerator. Each dog has gigabit channels, and so, watch netflixes from Uruguay and sit on Facebook from Iran and other China - give two, and right away.

    Hola Developers

    Even if the request does not have to circumvent any regional restrictions, the server’s task is to decide which client it should be sent to, based on the mutual location of the two clients, the presence or absence of the required content in the cache, congestion of peers, and many other factors.

    Once a relatively fresh developer with his commit ruined the load balancing system between network nodes, as a result of which the entire network lay down to rest for several hours.

    It is the ability to break everything with one wrong sneeze that makes it necessary to keep a considerable staff of people who are constantly monitoring: during the day, night, on holidays and weekends (and even on Monday!), And at the slightest sign of trouble, they will sound the alarm in the head .
    Of course, only the most hardy can cope with such an incredible responsibility. As with writing programs - only the best. We are looking for them during the day - with fire, at night - without fire. And since we only believe in code, we don’t even look at resumes and other achievements.

    There are decent jobs - send , become a highly paid employee of Hola. Unless, of course, you are interviewed by a crazy programmer boss who is obsessed with code quality.

    Also popular now: