100mbps Dedicated Server same download speed as a Shared Host! - hosting

I have two specs from two different hosts I am using:
(a) Dedicated server with Full duplex 100Mbits internet connection ($140 per month)
(b) Shared Host on a server that has 100Mbits internet connection ($7 per month)
I have tested my application which downloads from other servers and lets users download from my site in turn. I have tested this again and again and it takes the same time to download files! But the dedicated is much faster in the final download to the clients computer.
Firstly, are there any Linux commands or tools I can use to test bandwidth properly for each server?
Secondly, why the hell do they have the same download speed from other servers??
Please shed some light on this as I feel I've been wasting money for no reason!!
Thanks all

First, you can use iperf to test your network speeds. Second, you're not paying for the speed, you're paying for the power and flexibility of having essentially your own server configured however you want. With a shared host, your site is most likely on a machine with a hundred other sites, each competing for resources.
Also, the bottleneck is probably not on your end or on your host's end, but rather somewhere in between the content you're fetching and your servers.

if i read correctly, your shared server is just as fast as the dedicated when fetching a file, but much slower when serving it.
I'd say that the box your shared server is in has the "out" bandwidth mostly used by the other client's slices, while the "in" bandwidth is mostly unused, so you get almost full performance.
sounds right, since serving files is a lot more common task than fetching them.

The big difference between shared hosting and dedicated hosting is that with dedicated hosting, you're the only account using that box. With shared hosting, there could be (and most likely are) thousands of other web sites hosted on it.
If one of those sites goes wonky and takes the whole box with it, your site goes too. On a dedicated box, the only site that's going to go wonky is yours.
With dedicated, you probably also have full admin rights to the box, which you probably don't have with the shared host.

Well, one possiblity is that the shared site is on a host that has very little load from the other shared sites. If all the shared sites are just sitting there getting very little hits, then your site basically is getting full use of the box, so its no different from a dedicated box.
But if those other sites start getting traffic, your site will be impacted.
Not sure if the shared site is full duplex or not, but that doesn't always make a difference (not an expert there).

Perhaps the servers they are downloading from are the bottleneck? You could have a dedicated gigabit pipe but it won't help if you can only get 10mbps from the other servers.
Remember the benefit of a dedicated host is that your performance will not be affected by other processes on the machine. The extra money guarantees you that 100mbit, not that you'll see better performance than a hosted machine at any given time.

Related

difference between these 2 hosting packages?

This hosting provider has 2 packages at the same price, 1 is called webhosting and the other is called wordpress, they cost both $4.
The only difference between those two is that the webhosting package provides 1000gb of network traffic and wordpress only 100. The webhosting does have mysql & PHP.
Why would you buy the the wordpress package if the webhosting package provides more network traffic?
With shared hosting packages (WordPress or Conventional web hosting), bandwidth isn't important thing to be considered. Most of the shared packages never going to utilize more than 20 GB transfer. Knowing this fact, web hosts add more 0s to their offer to make it look more exciting. The fact is, you'll never going to use that much amount of bandwidth and you aren't getting any extra value.
I believe WordPress packages must have some additional features like, SSD storage, built in CDN, Caching Mechanisms, more RAM, CPU, Inodes, entry processes, etc. compared to ordinary web hosting. Better you ask your web hosting provider.
If you are looking to compare different web hosting packages head over to Hosting Recipe which will help you.

How to host sites on a single server?

I have five websites that I designed and now manage on a month-to-month basis. Currently, each website is hosted individually via HostGator. I am realizing this is the improper (and costly) way to manage multiple websites and am curious into how I could transfer the websites to a single server, and some hosts you guys find reliable.
Below is a snap of one of the sites usages, these are all static sites that are quite small. How much space would I need on my new, single server to accommodate 20 of these websites?
Current site usage:
http://imgur.com/18BvsC2
Your image shows you are using 6.7 megabytes of data for one website. If that is similar space usage for all 20 of your anticipated domains, you need virtually very little hosting space as far as storage goes these days. Most entry level virtual hosting plans come with more than enough to meet your 20 domain expectations of like usage.
You want virtual hosting regardless. Most web hosting providers have plans that allow you to host many domains, including hostgator. Here is a link to compare their plans. http://www.hostgator.com/shared-compare
I've used DreamHost and HostMonster in the past, with nothing bad to say about them.
Perhaps you should brush up more on the pros, cons and hows of web hosting. Here is a link I just googled that might get you started. http://www.webhostingsecretrevealed.net/web-hosting-beginner-guide/

Scaling Tigase XMPP server on Amazon EC2

Does anyone have an experience running clustered Tigase XMPP servers on Amazon's EC2, primarily I wish to know about anything that might trip me up that is non-obvious. (For example apparently running Ejabberd on EC2 can cause issues due to Mnesia.)
Or if you have any general advice to installing and running Tigase on Ubuntu.
Extra information:
The system I’m developing uses XMPP just to communicate (in near real-time) between a mobile app and the server(s).
The number of users will initially be small, but hopefully will grow. This is why the system needs to be scalable. Presumably for a just a few thousand users you wouldn’t need a cc1.4xlarge EC2 instance? (Otherwise this is going to be very expensive to run!)
I plan on using a MySQL database hosted in Amazon RDS for the XMPP server database.
I also plan on creating an external XMPP component written in Python, using SleekXMPP. It will be this external component that does all the ‘work’ of the server, as the application I’m making is quite different from instant messaging. For this part I have not worked out how to connect an external XMPP component written in Python to a Tigase server. The documentation seems to suggest that components are written specifically for Tigase - and not for a general XMPP server, using XEP-0114: Jabber Component Protocol, as I expected.
With this extra information, if you can think of anything else I should know about I’d be glad to know.
Thank you :)
I have lots of experience. I think there is a load of non-obvious problems. Like the only reliable instance to run application like Tigase is cc1.4xlarge. Others cause problems with CPU availability and this is just a lottery whether you are lucky enough to run your service on a server which is not busy with others people work.
Also you need an instance with the highest possible I/O to make sure it can cope with network traffic. The high I/O applies especially to database instance.
Not sure if this is obvious or not, but there is this problem with hostnames on EC2, every time you start instance the hostname changes and IP address changes. Tigase cluster is quite sensitive to hostnames. There is a way to force/change the hostname for the instance, so this might be a way around the problem.
Of course I am talking about a cluster for millions of online users and really high traffic 100k XMPP packets per second or more. Generally for large installation it is way cheaper and more efficient to have a dedicated servers.
Generally Tigase runs very well on Amazon EC2 but you really need the latest SVN code as it has lots of optimizations added especially after tests on the cloud. If you provide some more details about your service I may have some more suggestions.
More comments:
If it comes to costs, a dedicated server is always cheaper option for constantly running service. Unless you plan to switch servers on/off on hourly basis I would recommend going for some dedicated service. Costs are lower and performance is way more predictable.
However, if you really want/need to stick to Amazon EC2 let me give you some concrete numbers, below is a list of instances and how many online users the cluster was able to reliably handle:
5*cc1.4xlarge - 1mln 700k online users
1*c1.xlarge - 118k online users
2*c1.xlarge - 127k online users
2*m2.4xlarge (with 5GB RAM for Tigase) - 236k online users
2*m2.4xlarge (with 20GB RAM for Tigase) - 315k online users
5*m2.4xlarge (with 60GB RAM for Tigase) - 400k online users
5*m2.4xlarge (with 60GB RAM for Tigase) - 312k online users
5*m2.4xlarge (with 60GB RAM for Tigase) - 327k online users
5*m2.4xlarge (with 60GB RAM for Tigase) - 280k online users
A few more comments:
Why amount of memory matters that much? This is because CPU power is very unreliable and inconsistent on all but cc1.4xlarge instances. You have 8 virtual CPUs but if you look at the top command you often see one CPU is working and the rest is not. This insufficient CPU power leads to internal queues grow in the Tigase. When the CPU power is back Tigase can process waiting packets. The more memory Tigase has the more packets can be queued and it better handles CPU deficiencies.
Why there is 5*m2.4xlarge 4 times? This is because I repeated tests many times at different days and time of the day. As you can see depending on the time and date the system could handle different load. I guess this is because Tigase instance shared CPU power with some other services. If they were busy Tigase suffered from CPU under power.
That said I think with installation of up to 10k online users you should be fine. However, other factors like roster size greatly matter as they affect traffic, and load. Also if you have other elements which generate a significant traffic this will put load on your system.
In any case, without some tests it is impossible to tell how really your system behaves or whether it can handle the load.
And the last question regarding component:
Of course Tigase does support XEP-0114 and XEP-0225 for connecting external components. So this should not be a problem with components written in different languages. On the other hand I recommend using Tigase's API for writing component. They can be deployed either as internal Tigase components or as external components and this is transparent for the developer, you do not have to worry about this at development time. This is part of the API and framework.
Also, you can use all the goods from Tigase framework, scripting capabilities, monitoring, statistics, much easier development as you can easily deploy your code as internal component for tests.
You really do not have to worry about any XMPP specific stuff, you just fill body of processPacket(...) method and that's it.
There should be enough online documentation for all of this on the Tigase website.
Also, I would suggest reading about Python support for multi-threading and how it behaves under a very high load. It used to be not so great.

Load Balancing in Amazon EC2?

We've been fighting with HAProxy for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop, normally), but we've so far held our own, attempting to set proper ulimits, inspecting kernel messages and tcpdumps for any irregularities.
So far though, we've reached a plateau of about 1,700 requests/sec, at which point client timeouts abound (we've been using and tweaking httperf for this purpose). A coworker and I were listening to the most recent Stack Overflow podcast, in which the Reddit founders note that their entire site runs off one HAProxy node, and that it so far hasn't become a bottleneck. Ack! Either there's somehow not seeing that many concurrent requests, we're doing something horribly wrong, or the shared nature of EC2 is limiting the network stack of the Ec2 instance (we're using a large instance type). Considering the fact that both Joel and the Reddit founders agree that network will likely be the limiting factor, is it possible that's the limitation we're seeing?
Any thoughts are greatly appreciated!
Edit It looks like the actual issue was not, in fact, with the load balancer node! The culprit was actually the nodes running httperf, in this instance. As httperf builds and tears down a socket for each request, it spends a good amount of CPU time in the kernel. As we bumped the request rate higher, the TCP FIN TTL (being 60s by default) was keeping sockets around too long, and the ip_local_port_range's default was too low for this usage scenario. Basically, after a few minutes of the client (httperf) node constantly creating and destroying new sockets, the number of unused ports ran out, and subsequent 'requests' errored-out at this stage, yielding low request/sec numbers and a large amount of errors.
We also had looked at nginx, but We've been working with RighScale, and they've got drop-in scripts for HAProxy. Oh, and we've got too tight a deadline [of course] to switch out components unless it proves absolutely necessary. Mercifully, being on AWS allows us to test out another setup using nginx in parallel (if warranted), and make the switch overnight later on.
This page describes each of the sysctl variables fairly well (ip_local_port_range and tcp_fin_timeout were tuned, in this case).
Not answering the question directly, but EC2 now supports load balancing through Elastic Load Balancing rather than running your own load balancer in an EC2 instance.
EDIT: Amazon's Route 53 DNS service now offers a way to point a top-level domain at an ELB with an "alias" record. Since Amazon knows the current IP address of the ELB, it can return an A record for that current IP rather than having to use a CNAME record, while still being free to change the IP from time to time.
Not really an answer to your question, but nginx and pound both have good reputations as load-balancers. Wordpress just switched to nginx with good results.
But more specifically, to debug your problem. If you aren't seeing 100% cpu usage (including I/O wait), then you are network bound, yes.
EC2 internally uses a gigabit network, try using an XL instance, so you have the underlying hardware to yourself, and don't have to share that gigabit network port.
Yes, You could use an off-site load balancer.. and on bare metal LVS is a great choice, but your latency will be awful! Rumour has it that Amazon is going to fix the CNAME issue. However they are unlikely to add https, indepth or custom health checks, feedback agents, url matching, cookie insertion (and some people with good architecture would say quite right too.) However thats why Scalr, RightScale and others are using HAProxy usually two of them behind a round robin DNS entry. Here at Loadbalancer.org we are just about to launch our own EC2 load balancing appaliance:
http://blog.loadbalancer.org/ec2-load-balancer-appliance-rocks-and-its-free-for-now-anyway/
We are planning on using SSH scripts to intergrate with autoscaling in the same way rightscale does, any comments appreciated on the blog.
Thanks
I would look at switching to a off-site load balancer, not in the cloud and run something like IPVS on top of it. [The reason why it would be off of amazon's cloud is because of kernel stuff] If Amazon doesn't limit the source IP of packets coming out of the you could go with a unidirectional load balancing mechanism. We do something like this, and it gets us about 800,000 simultaneous requests [though we don't deal with latency]. I also would say use "ab2" (apache bench), as it is a little more user friendly, and easier to use in my humble opinion.
Even though your issue solved. KEMP Technologies now have a fully blown load balancer for AWS. Might save you some hassle.

Technical issues when switching to an unmanaged Virtual Private Server (VPS) hosting provider?

I'm considering moving a number of small client sites to an unmanaged VPS hosting provider. I haven't decided which one yet, but my understanding is that they'll give me a base OS install (I'd prefer Debian or Ubuntu), an IP address, a root account, SSH, and that's about it.
Ideally, I would like to create a complete VM image of my configured setup and just ship those bits to the provider. Has anyone had any experience with this? I've seen Jeff talk about something like this in Coding Horror. But I'm not sure if his experience is typical. I suppose it also depends on the type of VM server used by the host.
Also, do such hosts provide reverse-DNS? That's kinda useful for sites that send out e-mails. I know GMail tends to bounce anything originating from a server without it.
Finally, I'd probably need multiple IP addresses as at least a couple of the sites have SSL protection which doesn't work with name-based virtual hosts. Has anyone run into trouble with multiple IPs through VPS? I wouldn't think so, but I've heard whisperings to the contrary.
Slicehost (referral link, if you so choose) offers reverse DNS, multiple IPs ($2/month/IP), Ubuntu/Debian (along with others). The only criteria it doesn't support is the ship-a-VM one, but it does let you clone VMs you've set up in their system via snapshots. You could thus set it up once, then copy that VM as many times as you like.
If that's a sacrifice you're willing to make, I highly recommend them - they've had great customer service the few times I've needed to contact them, decent rates, and a great admin backend.
I like XenPlanet, their prices seem to be comparable, but they also allow you to purchase extras like added disk space. Not sure if they let you buy additional bandwidth.
I have used them for a number of different machines and found their service to be very good.

Resources