Elasticweb is the most affordable virtual hosting



Hello, Habr! Must apologize for my absence and such a long break in the publication of their digests. Life has changed radically, but I eagerly read all of the tapes and will soon continue its public gathering of interesting and useful things for web developers.

Now I want to tell you about our colleagues and creation. Elasticweb is the most affordable virtual hosting. Sounded probably too ambitious, but after getting acquainted with the tariff plans of dozens of hosting companies we simply have to think so. In Elasticweb there is no minimum and maximum value, we applied a cloud-based approach to service is shared hosting and does not restrict you on the number of domains, sub domains or databases. Customers pay only for the used hardware resources of the server.


Billing




Monthly service the n-th number of sites with a total attendance of 1,000 people a day may cost ~30 EUR per month or less. Look at the cost of keeping your projects will help our calculator.


Hosting


PHP version 5.6 with Opcache. By default, each server has Git, Composer and Drush, wpcli, antivirus and firewall. But the most piquant is that the web server uses Nginx. Undoubtedly, there are both pluses and minuses, but in order not to create another holivar on “Apache vs Nginx”, I'm not going to focus on the factors of this choice. For obvious reasons .htaccess files will not work, so we wrote and automated the choice of configurations for the most common CMS and frameworks: Wordpress 4, 7-8 Drupal, Yii, Joomla 2-3, Octobercms, OpenCart 1.5, 1.5 ZenCart, CMS Made Simple, KodiCMS, MaxSite CMS, MODx Revolution, Zend Framework, Symfony, Laravel, Codeigniter, Kohana, phpBB3, MediaWiki, Asgard CMS. We are also working on creating a full-fledged configuration editor Nginx with interactive prompts and avtomobilyami. And at the moment completely ready for free to help everyone in migrating an existing project to Elasticweb.

statistics Server


All our servers are working on Debian. Demon statistics needed for the resource frequency scans each process of the user and generates a report that is sent to the statistics server. A demon is on each server. The resulting data is grouped by servers and accounts and presented in the form of graphs in the control panel. To ensure no delays, we implemented the export schedule in a separate thread.

We monitor all processes in the system, whether the activity web server activity at the command prompt, or the work of the interpreter. The doctrine of statistical system — any interaction with the server should be taken into account ( CPU %, RAM Memory usage, IO operations, Disk usage, bandwidth, Web, MySQL, bandwidth). In other words, even considered an open SSH session.

The daemon is written in Python, using the libraries, daemon, psutil, pwd, os, time, requests, json, datetime, MySQLdb, threading, re, platform, and to analyze the traffic using a third-party module nginx-module-vts.

control Panel


Instead of CPanel and ISPmanager, it was decided to invent own Bicycle. First: the adaptation of existing products under the “elastic” seems to be a very voluminous task to accomplish which would have required a lot of crutches. Second: we still have a lot of ideas and implement them much easier on its own platform.

The main goal when designing and developing server-side Manager was to ensure fault tolerance. We implemented a queue system with priorities and a logical sequence of tasks. All commands are executed only after the verification of the security key and imprisoned purely on the interaction with the server control panel. In case of failure of any operation administrators comes an informative message about the problem.
We wrote a daemon in Python to listen for commands, which are transmitted from the control panel in JSON format. The panel itself is written in PHP. It was important for us to obtain an initial architecture and a minimum set of basic functions, so we refused big frameworks like Symfony or Zend and took 3 Codeigniter + HMVC ( to create modules ).

Initially, the project was supposed to be in Russian and English. We rewrote CodeIgniter default functions for working with URIs, so they can take into account the language. Speaking about localization, the way to store the translations in files and refer to them in the form of keys we did not like. So we use English as the base language in the code and drive it to a function which, in turn, connects to the database and looking for the right translation for this string based on the selected site language.

Control panel means a lot of forms code and processing took up too much space in the controller. Plus, some forms necessary to withdraw several times. So we wrote a Formbuilder for CodeIgnitor and put him on GitHub, believing that someone this tool will be useful. In General, our team is very altruistic refers to the open Source movement and we plan to keep this practice.

payment System


In the development of billing we have gone from billing/invoices, and monthly payments. By analogy with cellular subscribers, customers Elasticweb have a personal balance, which is the payment for the services. The balance can be negative within 7 days, after which the sites will be blocked and deleted after a month. In the future we plan to develop a system of trust to the users. And now we have a referral program for our partners, the terms of which you can learn here.

Apotheosis


First thought about Elasticweb came quite by accident, in ordinary conversation about the hardware, servers, cloud computing and hosting. Development lasted almost 3 months in their spare time. A month we spent on testing product and the first thing that comes to one of the most important and significant test for us is to go through the opinion of habravan.



Thank you all for your attention. With impatience will wait from you of criticism, questions and suggestions.
Article based on information from habrahabr.ru

Популярные сообщения из этого блога

Approval of WSUS updates: import, export, copy

The Hilbert curve vs. Z-order

Configuring a C++ project in Eclipse for example SFML application