01 November 2011

Cloudns.net - October graphs and statistics

October has been really stable and there were just few outages, really little time and always just one of 7 servers. Therefore no service have been affected in any way. The only problem was PNS2 which had 4+ hours of outage in one period. That could be a bit problematic for those who changed their domain settings in same time as it would synchronize all servers except the PNS2. I like Cloundns.net improved stability and service a lot.







27 October 2011

Multiple values in one column (aka GROUP_CONCAT for T-SQL)

There are times when you need create SELECT which includes column with multiple values from different table. Apparently there are functions for that for other databases like MySQL or Oracle. MS SQL does not have similar feature so we have to create one ourselves.

There are various way to do this but first of all SQL tables. I have own structure already in place with some thousands of records (some might say not enough, but we will see clear speed difference anyway):

Table #1 - page
id int
id_hash nvarchar(40)
title nvarchar(100)

Typical data look like:
1    004AAEAE62F8B...   Title XYZ
2    00EAF730FC50B...   Title 123

Table #2 - page_modules
id int
id_parent nvarchar(40)
module_type nvarchar(20)
module_id nvarchar(40)

Typical data look like:
1    004AAEAE62F8B...   GALLERY      01D2255A09E....
2    004AAEAE62F8B...   ARTICLE      045A6F30D05....
3    00EAF730FC50B...   ARTICLE      068FC352B6B....

And now what we want to have:
1    004AAEAE62F8B...   Title XYZ   GALLERY|ARTICLE
2    00EAF730FC50B...   Title 123   ARTICLE      

This is just example what I want to have in my SELECT results. Original table #1 has over 15 fields and table #2 is pretty much same. Table #1 has around 1000 records, table #2 has around 3 times more because of modules linked to pages.

I have tried 3 different method how to get result I need. 

Method #1: Creating T-SQL function with COALESCE

CREATE FUNCTION [dbo].[GetModules]
    @parent nvarchar(40)
RETURNS varchar(max)
    declare @output varchar(max)
    select @output = COALESCE(@output + ' ', '') + module_type
    from vwPagesModules
    where parent = @parent

    return @output

and test SELECT:

SELECT *, dbo.GetModules(id_hash) FROM vwPages AS p

                                10 runs average
Client processing time          98.2000
Total execution time            107.3000
Wait time on server replies 9.1000

Method #2: Creating SELECT within SELECT

    modules = (
        select module_type + ' ' from vwPagesModules pm
        where pm.parent = p.id_hash
        for xml path('')
from vwPages p
                                10 runs average
Client processing time          31.9000
Total execution time            46.2000
Wait time on server replies 14.3000

Method #3: Creating SELECT with CROSS APPLY

SELECT *, LEFT(module_type , LEN(module_type )) AS module_type
FROM vwPages AS p
    SELECT module_type + ' '
    FROM vwPagesModules m
    WHERE m.parent = p.id_hash
    FOR XML PATH('')
) pre_trimmed (module_type)

                                10 runs average
Client processing time          32.3000
Total execution time            49.0000
Wait time on server replies 16.7000

These tests are by no means scientific tests, I would need more data and probably optimize tables a bit but I hope that it can quickly show you what methods can be used for this functionality and how it behaves. Personally I like method #1 because you dont have to write complicated Selects but it's the slowest of pack and I believe having 100 000 records the difference would be even bigger. Method #2 and #3 are pretty much same speed.

I am planning to repeat these tests on much larger database and also implement some WHERE filtering to see how these methods cope.

Finally, all tests have been done directly on MS SQL server machine locally, using MS SQL Server Management Studio.

Please leave comments with your opinions, ideas or just to say thanks.

17 September 2011

New ElasticHosts beta control dashboard

ElasticHosts have released beta version of their new control dashboard. I have to say it is really good and many things I did not like before have improved.

This is quick comparison how the old and new dashboard looks.

You can immediately see that the new dashboard is much better optimized, virtual drives are put next to the actual machine and the space is used more effectively.

What the new beta dashboard brings is much better work with AJAX. You can change you VNC password on the fly, without need to switch off machine and then switch it on. Just click on VNC password box and put the password to active VNC or leave it empty to disable VNC service.

The same AJAX functionality work with static IP addresses. Whilst in old dashboard you had to email EH to setup reverse DNS records in you you can do it on your own:

Finally, server configuration screen is now a lot better, it is clean and easy to understand:

as compared to: 

Overall, I think people at ElasticHosts have done great job and I am glad to see EH to try to improve all the time. 

Finally, don't forget you can try EH free for 5 days. And if you decide to use their services long term and you found this blog to be useful you can mention my name to them. Maybe they will give me some free credit to do more testings. 

Cloudns.net service availability update

It has been long time since last Cloudns.net service availability update. So here you go, these are Icinga statistics for last 31 days for all Cloudns.net DNS servers:

DNS-cloudns-ns1100.000% (100.000%)0.000% (0.000%)0.000% (0.000%)0.000%
DNS-cloudns-ns296.517% (96.517%)3.483% (3.483%)0.000% (0.000%)0.000%
DNS-cloudns-ns399.927% (99.927%)0.073% (0.073%)0.000% (0.000%)0.000%
DNS-cloudns-ns4100.000% (100.000%)0.000% (0.000%)0.000% (0.000%)0.000%
DNS-cloudns-pns199.952% (99.952%)0.048% (0.048%)0.000% (0.000%)0.000%
DNS-cloudns-pns2100.000% (100.000%)0.000% (0.000%)0.000% (0.000%)0.000%
DNS-cloudns-pns3100.000% (100.000%)0.000% (0.000%)0.000% (0.000%)0.000%

I hope that helps you with the decision whether to use or not Cloudns.net and whether to go with free servers or pay small additional fee for premium servers.

I have to say, I think they improved their service massively. We shall see how it goes in future.

07 July 2011

Last 7 days of Cloudns service, NS1-4 and PNS1 + PNS2

Last 7 days of Cloudns service, NS1-4 and PNS1 + PNS2. No need to comment:







21 June 2011

New control panel for ElasticHosts

I have been contacted by Anna from ElasticHosts and I have been given access to new (still beta) control panel for ElasticHosts accounts.

I have to say it looks much better and it is much easier to navigate through the virtual machines and its mounted drives. There might be some issues but I cant wait for this version to go live. It will make our life much easier.

Good job ElasticHosts.

ElasticHosts - weekly update and first SLA refund

First of all I'd like to show you last weeks EH availability graphs:



As you can see last 7 days it has been 100% working and functional. That's exactly the reason why I have chosen EH as our IaaS provider.

There are couple of things:

  1. 22 minutes downtime 2 weeks ago have been refunded under SLA (We got around 6 pounds of credit for 22 minutes). They had problem with faulty switch and problems were 4x 5 minute periods. 
  2. Be carefull when you create new VM, problem with their current control panel (which I honestly dont like, it might behave pretty but it is not very usable) is that it will allow you to create machine even if you dont have enough free resources. I made mistake when creating 3rd machine (debian) which I wanted to have only 500mhz cpu and 256 ram. I forgot to change sliders and kept default 2000mhz and 1024 ram and it  created this machine although I did not have enough free resources on my account.

    Immediately I got email that I need to increase my credit or in few hours all machine would be switched off. This is not good behaviour, by mistake I created unwanted machine and it immediately charged me. If I did not have SLA credit from EH on our account I would probably disabled all our machines by mistake. Not good.
That's all for now, if you want to have a good try free trial here.

Cloudns.net down again - DDoS attack again?

Few questions first:

  1. Who hates Cloudns.net so much that every week or two they are under DDoS attack? 
  2. Who have resources for such attack every time and repeat it so often?
  3. How is it possible that of 5 servers at least 3 or more can be down?
And now stats from Icinga, it will tell you more than just words:



And now the main problem: With one server running there is a good chance your websites and emails will work fine BUT if you do any change to domain settings they will not synchronize correctly and you will have DNS zones split. Just try http://www.intodns.com.

This makes this service unusable, really. 

This is not the first time this happened, nor it will be last. People (or maybe one person) from Cloudns.net dont have enough skills, or money, or time, or all to make this service 100%. I guess it is money first, for such a price (free or really cheap money for premium) they cant have loadbalancers, firewalls and technology to stop DDoS. And someone really hates them. Other Nameserver provider? Make your own guess.

10 June 2011

ElasticHosts - Real user & hosting experience

Once in a time every web developer or company has to go through stressful and painful experience of choosing right solution for web hosting, server hosting, cloud hosting, name server hosting, etc. It is usually weird experience because you must rely on people recommending or completely trashing particular provider or hosting.

There are dozens of forums for webmasters with discussions about hosting, posts about recommended or bad providers. The problem with such forums is that for every recommendation you have 3-5 bad opinions. It means that service or  provider itself may not be necessarily bad but there are people who try to ventilate their frustration online. You don't usually get positive reviews online, if it works there is no reason to complain online.

We have been looking for right provider and solution for 2-3 weeks. First choice was to choose dedicated, VPS or cloud hosting. We chose cloud hosting based on fact that we had option to try ElasticHosts, CloudSigma, RackspaceCloud for free and directly compare it against our current dedicated HP ML330 G6 with RAID1 SAS drives. We have done plenty of tests and were quite happy with the speed of servers, network.

We chose ElasticHosts simply because:

  • they have partnership with Peer1 and ServerBeach, both of them considered quality providers.
  • Peer1 seems to be really good and fast network, we dont have problem with websites speeds in Slovakia, people from CZ, UK and US are all reporting very good speeds. Something we could not guarantee on local servers 
  • prices for the service were/are acceptable. I wonder how will the prices change in time with dedicated providers giving 1TB+ of traffic for free these days. Even ServerBeach gives 1TB of traffic with their cheapes dedicated server (£89 )
  • we cant be bothered with own hardware, costs and problems related to own dedicated servers. With dedicated server providers I don't like idea of waiting for support to change drive or memory for few hours (we have seen some horror stories), we prefer option of simply moving our VM into another HW
  • they have IaaS cloud platform and accept clients system images, own API and Elastichosts are gainong popularity with many scripts/packages supporting them directly
  • they have persistent storage up to size of 2 TB, hopefully prices for drive will get a bit lower in time
  • easy to use control panel, quick and easy creation and administration of various systems, no packages with fixed memory, cpu and drive for every package. You simply buy memory, drive, cpu and you can split whatever way you want. The minimum for first order is 2ghz cpu, 1024mb and rest you can do whatever you want
  • very quick support and sales responses (90% of responses comes from Anna, so she is either robot, workaholic or whoever replies they have they all have emails set as Anna)
  • very good documentation and FAQ, so good and big that I missed many important points but luckily support is really good and responsive and they replied to everything very quickly
  • I had technical problem so picked up a phone and ... they are live people so you can have chat and discuss technical things over the phone quickly
  • ... and finally because it is cloud/VPS/whatever you call it. If we don't like it, we simply download drive images and go to another cloud/VPS provider. Simple as that, no long contracts ...
There are few unanswered questions
  • How big and reliable they are? Time will tell, so far they had one problem with faulty router and they seemed to solve it quite quickly
  • What happens if there is a problem with the site outside their work hours? Phone switches to voice mail. 
  • All other providers have online system monitoring available to clients and public. Elastichosts don't have that now, they said they are planning to do it for public as well. So for time being I have been using Icinga to monitor all servers, network. 
  • Prices. Will they move as HW and connectivity gets cheaper? Fact is that Cloud hosting is simply more expensive than even dedicated server.
If you are interested, this is the Icinga Trends graph for last 7 days. You can see that outages were always at night, that's because we were configuring Win2k8. So not Elastichosts fault.

Cloudns.net - additional experience & Godaddy Premium DNS comparison

Since March I have learned new things about Cloudns.net. First of all I have to say that I like it a lot. But there is one big problem. Reaction time. I don't know why is that but they seem to have periodic problems with the service. It might be DDoS attack, it might be technical problems or maybe something else. Really big issue is that it always takes more than few hours for them to even start to solve the problem. If you are using only and only Cloudns.net services you might be in for trouble.

The best practice for me over the time is to have one additional DNS server. With the prices so low for linux virtuals you can simply pick provider, setup any Linux (I prefer debian and bind combination) and create secondary DNS server. It should cost you really minimum but you will keep your NS servers alive all the time.

Once frustrated with the Cloudns.net service I have decided to use Anycast Premium DNS from Godaddy. But it was such awful experience that just after two days I have asked for refund. Few points I dont like about Premium DNS:

  • Only two Nameservers - this might be enough but I live by saying more is better
  • Vanity servers - this is really showstopper for me. You can use vanity servers only for domains hosted by GoDaddy.com. What is the point? Cloudns.net is not asking about domains and their registration. You have it, you setup Cloudns.net nameservers (or vanity nameservers) and that's it.
  • Unbelievably slow and difficult to use control panel - Where was the UX designer when they developed Godaddy.com control panel? It is really difficult to use. And I have been using them for over 4 years for domains. Showing control panel to my wife I realized she couldnt move there and find anything I asked for. Fail.
Overall, I like Cloudns.net and they have added new servers and promised to make sure they will completely stop service failures. We shall see, I have my own backup DNS server so I can sleep much better now.

24 March 2011

Top 3 online DNS testing tools

Here is my list of favorite DNS testing tools:"

  1. IntoDNS (www.intodns.com)
    Completely free and really sophisticated information about you domain name. 
  2. DNS Check (http://dnscheck.iis.se/)
    Also very good tool but not as sophisticated as IntoDNS
  3. How is my DNS? (http://www.howismydns.com/tools.php)
    Not my preferred tool but I always use it to cross-check results with previous two tools.
All mentioned tools are free and without any subscription payments or so.

If I had to pick one paid tools I would definitely go with this one:

Cloudns.net DNS management service - experience

I have been using paid version of this service for some time and I think I have enough information and experience with the service to describe it to others. Some facts:

  • free or paid version
  • paid version is very cheap
  • it is not anycast (go and try godaddy.com)
I dont know whether to start with good or bad. So I guess I'll start with bad things:
  • Seems to be popular target for DDoS attacks, so far there was one 12 hour failure (sometime between Christmas and New Year's Eve)
  • Very slow to respond to any questions or suggestions
  • Main NS1 machine is the same one as API/web control panel machine
  • It doesnt have templates (yet, but not showstopper as you can copy records mega quickly. see good things.).
50/50 things:
  • because they are slow to respond you just hope there is no technical problem. they have 4 servers on quick lines so intodns.com is really giving good results with cloudns.net. if all works (which it does most of the time)
  • stability? it seems like small company or clever individual effort, so dont know what happens if something happens? They seem to be improving constantly so for now I have all domain with them. I just exported all records into bind back files and if something happens I will be back in no time with other provider. I have also 5th nameserver which is mine which mirrors all records.
Good things:
  • It is cheap, mega cheap for that service 
  • It has 4 independent nameservers
  • You can create vanity servers
  • You can easily import existing bind zones
  • You can see live statistics for your domain
  • You can specify all sorts of settings (A, AAAA, CNAME, MX,  TXT, NS, SRV, web redirects)
  • It is fast (if it isnt under DDoS attack). Working with control panel is approximately 1000x quicker than Godaddy.com control panel. You can easily copy all required records between domains, it is really fast and quick.
  • You can create Cloud domains. Basically you create one domain and all records and if you have other domains with exactly same settings you just put them into domain cloud and they all work immediately with same records.
I hope this helps you with potential dns hosting selection. There are more services online but I am quite happy with cloudns.net. I have been using them since december 2010 and so far they had 3 ddos attacks I am aware of. The first one was really bad but it seems that they learnt good deal about how to secure their servers and other attacks were problems free and all worked well (except control panel, but zones were working correctly)

For questions please use discussion

HeadJS script? Is it really necessary?

I have read articles and forum posts about HeadJS script and how good it is, how it can speed up your site and basically do miracles with your sites :)

Head.js (http://headjs.com/) is tiny script which improves loading speed of your websites/pages.

The latest version is version 0.9. Demo on the headjs.com has some problems,  I find it really strange that developer has not yet updated javascript links within headjs demos (there are 404 errors and js wont load). So they are basically worthless if you try to measure speed.

I have removed all github links and added various CDN javascript libraries. Now all the libraries are working, return status 200 OK. Point of CDN usage is that scripts wont be slowed by speed of my web server and most of these javascript get loaded from CDN anyway.

Original test is from head.js website, it calculates how long it takes to load page either using classic <script> within <head> or using just one <script src="head.js"> library and rest specifying as javascript call:

head.js("https://ajax.googleapis.com/ajax/libs/yui/3.3.0/build/yui/yui-min.js") .js("http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js") .js("https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js") .js("https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js") .js("https://ajax.googleapis.com/ajax/libs/mootools/1.3.1/mootools-yui-compressed.js") .js("http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js");

You can try amended benchmars here:

HeadJS demo with script src (i am ignoring bottom <script> locations):

HeadJS demo with head.js

I have disabled all extensions, addons, plugins for all browsers to make it as fair as possible. Still this is not any scientific test and methods used are pretty lame. But it works for me as this is how normal person browsing a page will see it.

And my results (please feel free to post your times in discussion):

Chrome 10.0.648.151


  • 1st  run, empty cache: 261ms
  • 2nd run, cached files: 38ms


  • 1st  run, empty cache: 24ms
  • 2nd run, cached files: 14ms

Results are quite clear, head.js loads page much faster than classic <script> method.

Firefox 4.0


  • 1st  run, empty cache: 263ms
  • 2nd run, cached files: 111ms


  • 1st  run, empty cache: 261ms
  • 2nd run, cached files: 108ms

Really interesting this one. FF 4.0 basically wont show any difference with 1st run, same numbers for both first runs. Even more interesting is that cached run is the same speed for both versions. 

Internet Explorer 9.0


  • 1st  run, empty cache: 368ms
  • 2nd run, cached files: 116ms


  • 1st  run, empty cache: 18ms
  • 2nd run, cached files: 8ms

This is really surprising result, IE9 loads head.js fastest from all browsers. Yes, I have tried everything, I deleted cache, closed whole IE9, deleted cache and loaded page. Times are very consistent and it really is mega fast. It is even faster than Chrome 10. 

Internet Explorer 8 (IETester)


  • 1st  run, empty cache: 361ms
  • 2nd run, cached files: 206ms


  • 1st  run, empty cache: 16ms
  • 2nd run, cached files: 14ms

Again huge time difference. I am only using IEtester but it seems that it really is such a difference when loading site. Again, I am loading page without cache for 1st run, and then cached for 2nd.

Internet Explorer 6 (IEtester)


  • 1st  run, empty cache: 670ms
  • 2nd run, cached files: 180ms


  • 1st  run, empty cache: 21ms
  • 2nd run, cached files: 15ms

This is most visible difference when loading the page. Old IE6 just won't die and head.js can quite improve loading time. 

It seems that head.js really can improve webpage loading times. However, I won't be putting it into my projects until I am 100% sure it works well with all the JQuery plugins and javascript codes.  But big thanks to developer for creating such useful tool, I am sure that many sites will use this soon (or in fact use it already).