AsynStack performance

AsynStack is designed with optimization in mind from the very beginning. Technologies and software are carefully chosen to bring the hardware to its edge. The result reaches impressive 1000 requests per second on a $10/mo VPS and up to 5.3 times faster than common LAMP stack. Asyncode Runtime makes only 30% overhead over the simplest Python's "Hello World!" app.

Asynchrony

The major webapp optimization factor in recent years has been the transition from traditional sequential models into their asynchronous equivalents. Performance gains are visible across all parts of applications but mostly in the responsiveness of user interfaces now running almost entirely in the web browser. AsynStack delivers solution to move computations back to users' machines and focuses on providing secure, fast multi-user experience and reliable data storage on the server side. Performance gains of moving computation to users' machines are tremendous. AsynStack pushes this approach to its edge using JSON, and its XML equivalent - ObjectML, as internal data format starting with database and finishing with user interface.

Extensive XSLT usage

XSLT stands for eXtensible Stylesheet Language Transformations. It is probably one of the most neglected languages supported across all major web browsers (nearly 90% of overall servers' traffic). XSLT is used to merge data and a template to a single HTML document displayed in the browser. The shift of computation to the client machine allows for up to two times more requests per second than in a server-side HTML generation mode. In terms of network efficiency, XSLT can cut up to 60% of server's output transfer - it sends XSLT-based template to the browser just once and then fills it up with incoming data.

Developers can choose between their own XSLT solutions and Asyncode Frontend - the front-end framework incorporating XSLT, YUI Library and some CSS. AC Frontend's XSLT solution allows for further performance improvements.

Nginx and UWSGI

The Nginx and USWGI combo is the most reliable WSGI solution out there. And it is fast! Here is a benchmark on the topic. Nginx simply can't use RAM or CPU. The bottleneck is your network cable

Python

According to http://shootout.alioth.debian.org/, Python is the fastest stable scripting language available*. If the speed of algorithms is not satisfactory, you can always write a library in C - the world's fastest language (or even in assembly language, which is supported by C compilers). CPython slightly outperforms JRuby and is nearly 2 times faster than PHP, Ruby and PERL. But these tests are not anywhere near real-world examples. CPython has a very fast IO module written in pure C and this is exactly what is important in webapps. What is more, we know which Python's internals are slow and we do not use them. As a result, we bring to you software that generates only 40% overhead over simple "Hello World!" app written in pure Python. If even this is not satisfactory for you, there is also PyPy Python or C (or assembly language:) ) extensions, which can speed up software even more!

* We wish JavaScript V8 engine with Node.JS was stable enough so we could write the code in that language, but it is not the case as of now according to the main developer of Node.JS.

Caching system

There are many ways to develop software, but when optimization is among the key concerns, there is only one good way - caching. We have implemented software to run in two phases. The first request is the slowest because it compiles the app source code to more effective structures, but every other request is delivered almost entirely from the extensive cache system. The current state of the art is that cache speeds up page generation up to 10 times!

Additionally common HTTP caching system and Asyncode's free hosting of AC Frontend static files can result in another 60% savings on output traffic (XSLT savings not included).

Database

We recommend MongoDB as not only significantly faster than MySQL or PostgreSQL, but also around 2.3 times faster than EXT4 filesystem in our tests! Because of its document-oriented architecture, in most cases applications need to query the database only once. This big difference is achieved entirely through a change in habits and not sacrificing any functionality of relational databases. Still MongoDB is pretty young and does not have much functionality found in SQL as of yet, but we did it for them by extending ObjectPath query language with many functions. ObjectPath is only two times slower than Python itself so the overall result of switching from SQL to Mongo is a 5 times faster app on average. However, the difference can approach infinity in a number of cases!

Quick summary

CPU

Runs efficiently even on smallest VPS with approximately 500MHz of computational power.

RAM

256MB of ram is more than enough to successfully run AsynStack and respond to any amount of users requests.

Throughput

Up to 1000 requests per second on $10/mo VPS

Traffic

Up to 60% savings on output traffic

Optimization services in support plans

Installation and configuration

All support plans include installation and configuration of Stack by our staff and help with performance issues through e-mail or support center. Additionaly there is one per year "hardware meets its edge event support" product which is an attempt to increase throughput of Stack and user application so that buying bigger hosting plan or new hardware is postponed as far as it could.

Faster algorithms at hand

The commercial license of Asyncode Runtime included in all support plans allows you to use an even better optimized version with more efficient algorithms than the community version.

Profiller and debugger - Developer plans

Profiller enables developers to easily track the slowest parts of their applications while debugger shows clearly what the system does and why. The slowest parts can be fixed internally or with our staff's assistance

HTTP related optimizations

Help with Javascript and CSS files versioning, implementing CSS sprites technique, using browser caches and reducing the ammount of requests.

Databases optimizations

The most advanced support plan includes help with migrating SQL-based databases to MongoDB, optimizing Mongo's queries and their amount, using Mongo as a caching system.


© Copyright Asyncode Ltd. All Rights Reserved Home | Contact
Powered by Asyncode Env