Pages

Thursday 8 October 2015

Static Sites in Cloud Storage.

Static Sites in Cloud Storage.
Most of today's Web sites are dynamic. Their pages are generated on the server side, and then displayed in the user's browser. Many of these sites operate on the basis of simple and user-friendly CMS (content management systems) in the composition of which is usually included WISYWYG-editor, simple and intuitive. Despite the apparent simplicity of working with dynamic sites raises a number of inconveniences.

The functioning of a dynamic site is provided "bundle" of the Web server application to generate pages and databases. The interaction of all these components is often associated with serious cost of system resources. To reduce the load and reduce the generation of pages, caching, but it can be used not always and not everywhere. Typically cached content having a large amount - for example, drawing. Also caching is necessary to minimize the number of database queries.

Some difficulties are also setting up a web server and software. In addition, dynamic websites are vulnerable to DDoS-attacks.

In connection with all the described disadvantages and difficulties in recent years greatly increased interest in the static site. A static website is a set of files (HTML, JS, graphics, fonts), placed on the server. For its maintenance does not require much system resources; with backup also does not cause any difficulties. Pages for such sites can be created and edited in any text editor.

To join the content with templates you can use the so-called generators of static sites. Generators there are so many (one of only GitHub published several dozen). The most common and popular are Hyde, written in Python, and Jekyll and MiddleMan, written in Ruby.

Review all existing generators of static sites goes far beyond the scope of this article; all interested reader is referred to detailed comparative table.

There are a number of categories of sites, which are much more convenient to do static: websites, business cards, blogs, catalogs, online documentation for software products and technical devices. For such sites may require dynamic part - comments, search, private office user, the creation of pages, but it could be implemented with the help of third-party tools, copes with the tasks incumbent upon them.
We offer a platform for their own static sites, a fairly simple and easy to use. It is about our cloud storage. Below we will discuss the benefits of using our repository for hosting static websites. For readers who want to try to place the repository in your own website, we provide a detailed step by step instructions.

Cloud Storage FTP Access.

cloud storage ftp upload
FTP - one of the oldest application protocols: it appeared long before even HTTP and TCP / IP, back in 1971, and is widely used so far. It is carried out via FTP to upload files to remote resources. Our cloud server also supports the popular and familiar to many users a way to upload files. In this article we will talk about the features of the c repository by FTP, as well as give instructions for configuring the most common FTP-client: FileZilla, WinSCP, FAR Manager, Total Commander, Midnight Commander, Cyberduck.

General Recommendations:

Use passive mode;
Use the binary transfer mode;
For correct display of Cyrillic names of files, use UTF-8 encoding;
Always check downloaded files by size and / or checksum.
Connecting and Configuring Access

Connecting to the storage via FTP at the address ftp://ftp.yoursite.com. For safety reasons, we recommend to connect via FTP does not use the master account, and create a separate (optional) user.

Selecting Connection

The main difference from other FTP protocol is to use secondary connections to transfer files. When connecting via FTP creates a so-called control connection, which is transmitted via the protocol commands and responses. To transfer files or a list of files and directories, the client first sends commands via a control connection, and then create a data connection. This connection can be created in two modes: active and passive.

In active mode, the client tells the server address and port, to which one must perform a secondary connection. In most cases, this mode will not work if the client to access the Internet using the broadcast network name (NAT) and does not have a public IP address.

In passive mode, on the contrary, the server tells the client address and port for the secondary connection. This mode operates in almost all cases, and is preferred.

Selecting Data Transmission

Data transfer via FTP is carried out in two basic modes: text (sometimes called mode ASCII) and binary. These modes are specified FTP-command TYPE A and TYPE I, respectively.

When sending text mode often have problems. They are connected with the fact that different operating systems use different end of line characters. Microsoft Windows for example uses a CR + LF (carriage return and line feed), while Unix-like systems, including Linux and MacOS X - only LF, and MacOS traditional system (MacOS 9 and older) - only CR. According to RFC 959 to all files when transferring files via FTP as a symbol of the end of the line, use CR + LF.

When transferring a file to the server the client must bring them into the proper form in accordance with the requirements of the system used: If you are using Windows, you do not removed; if you are using * nix-systems - removes extra CR, and if you are using older versions of MacOS - extra LF.
Similar operations are carried out and when downloading files from the server: the server causes line endings to the form CR + LF, and the client after receiving the file removes extra end.

When the client and server are running different operating systems, transfer files change. Therefore, the text mode is not suitable for the transmission of files with random characters - for example, images or video; they will be damaged in the future will not be read at all.
Binary mode transfers files unchanged. When working with the cloud storage via FTP is strongly recommended that you use it.
To correctly display the Cyrillic filenames is recommended to use UTF-8 encoding.

Tuesday 6 October 2015

How does the New Cloud Hosting.

Cloud Hosting.
Domains and Projects

Each user of the service "virtual private cloud" gets at the disposal of the domain - their own virtual space to create projects and users. A project in this case refers to a collection of objects and resources that can be accessed by a user: the virtual machines, disks, networks, and others.

Resources and Quotas

At the beginning of the cloud becomes the owner of the resources (memory, core CPU, disk space), and distributes them among its projects, thereby setting limits to create a variety of objects. At any time you can reallocate resources between projects, or to give up some of the resources.

Access Management
The owner of the virtual private cloud can create users and set permissions for them to projects. This feature is intended for corporate clients, as well as resellers, create a project and provide access to external users on a commercial basis.
For each project, a direct link through which you can gain access to its resources, without registering in our panel. In the near future we plan to implement the ability to customize and design changes to the external user panel.

Flexible Creation of Virtual Machines

Our service allows the user to create just such a machine, what he needs, not forced to choose from several pre-defined configurations (flavor), as is often done in the clouds, implemented on the basis of Openstack. At any time, you can increase each parameter of the virtual machine (for example, the amount of RAM), the whole thing with the other.

Network Connections

Virtual machines can be connected to the network in various ways. The owner can either rent the clouds, we selected a public subnet (the same way as it is done for dedicated physical servers), or use the mechanism of "floating» IP-addresses (floating IP).

In the latter case the machine receives an address from the private network, which may be assigned a public address from the common pool. At any time, you can decouple the IP-address from one machine and attach it to another. Converting external addresses to internal and vice versa by means of a virtual router.
Machine can also be connected to an isolated local area network (for example, if it is used as a backend and immediate access to the Internet it is not necessary). If necessary, such a network can connect to the router and assign some machines external IP-addresses - for example, for ease of maintenance.

Download Images

The new cloud is supported by a set of images for the most common distributions of Linux (such as Ubuntu, Debian, CentOS, OpenSUSE), as well as Windows Server 2012. In addition to the standard agent cloud-init, is present in the images we have created an agent that implements a number of useful features: reset password on request from the control panel, the static network configuration (if there is no DHCP), and SSH-control keys. In addition, customers can upload their own images to the project of virtual machines. Supported image formats are used in systems virtualization Virtualbox, KVM, VMware, and the format of Amazon EC2.

Hard Disks

The machine can be connected to any number of hard drives. Wheels can be created as a blank, and on the basis of images. Supported by technology snapshots. If you allow the possibility of the operating system in a virtual machine disks can be connected and disconnected "on the fly".

Other Possibilities

Among other things, it supports the ability to add SSH-key, the graphical console generation RC-file to work with customers and other console. In the near future the emergence of many new features - stay tuned!

Connecting to the Cloud Storage CDN.

Cloud Storage CDN.
On any website there is a fair share of "heavy" static content: JavaScript-libraries, CSS, graphics, various binaries ... Storage and distribution of this content is always associated with certain problems: all this we have already been contacted and told how their It can be solved by using our cloud storage.

Difficulties with the distribution of static increase with increasing site traffic. The load on the server increases, the page load time increases, users experience more inconvenience ... Enormous role played by geography: the further the user is from the server that hosts the site, the slower he works.

Geographical distance from end users hinders the development of many Web projects and expand their audience. In many regions of the world still lacks the ability to high-speed Internet connection. For example, residents of Petropavlovsk-Kamchatsky and Yuzhno-Sakhalinsk almost do not listen to Internet radio and watch videos online: service providers in these regions do not offer unlimited tariffs. Meanwhile, the share of "heavy" content on the Internet is growing, and the low rate of delivery in the current conditions is unacceptable.

Today we are prepared to help our customers to overcome the distance and ensure the delivery of static content at maximum speed. We are connected to our CDN cloud storage powered by Akamai.

Seconds are everything

It seems to be 4 seconds - it is very small. But according to statistics, if any Web page loads even for a few milliseconds longer than this time, users will go with her - and never returned. For commercial web projects can turn into extra seconds and financial losses.

Search engines tend to prefer fast works. Firstly, the load time is taken into account in ranking formulas. Secondly, we should not overlook the behavioral factor: people leaving the page loads slowly, it reduces the "weight" to the search engines. Slowly working site is unlikely to become really popular among a broad user audience. Experience shows that the speed of operation significantly increases the attractiveness of web services to the public (see. Eg, interesting stuff here).

Slow download speed significantly reduces the effectiveness of contextual and banner advertising. When visitors come through advertisements, but the fully loaded website are not waiting, it means that the money invested in advertising, in fact turn out to be wasted: the user never sees what he has seen.
These examples are more than convincing evidence that low download speed naturally entails serious problems.

Of course, the Internet every day is becoming faster and cheaper, but the inconvenience of an abundance of "heavy" content and the slow rate of its load, still do not disappear. Many sites, rich graphics and animations, with great difficulty, with the opening of mobile devices, if the connection is made via the 3G-network.
With CDN can solve all the problems described above and to make the site could be downloaded quickly from anywhere.

How does CDN

Abbreviation is CDN content delivery network - Content Delivery Network. CDN is a geographically distributed network of the main assembly (Eng. Origin), and caching nodes (Eng. Edges) - points of presence, which can be located in various parts of the world. That they are cached all the most "heavy" elements of the site. When accessing the main server the user will be redirected to the nearest point of presence. Thanks to this network path between servers is reduced, and the site is much faster from a user perspective.