Tuesday, August 23, 2011

Throttling in a cloud environment

What is throttling?
The word "throttling" simply means "controlling" when it comes to the computing world. Throttling can be seen in action in different situations. For example,
  • On a LAN, the network admin may throttle the bandwidth to control network congestion and server crashes.
  • An ISP may throttle the bandwidth for some users to control their usage above a certain limit.
  • CPU throttling is used to conserve power or reduce the heat generation.
Why throttling is important in cloud computing?
When hosting a cloud, you have to be aware of the multi-tenant aspect which can cause problems in consuming cloud resources. A large number of users may using the cloud environment in different ways. If your cloud is a PaaS, they'll be hosting services or web applications. If it is SaaS, they'll be using your software. If it is an IaaS, they'll be running VM instances in your platform.

In any of the above scenarios, if a user is consuming too much of your resources, it can cause problems to your entire cloud environment. Either you have to control the user's behaviour or you have to scale up your resources to cater the situation and then charge the user for consuming resources. Even though you decide to scale up and charge, it is always to good to have a control mechanism.

Another advantage of throttling is, you can use it to support your billing system. For example, if you charge based on subscriptions and you want to restrict the users consuming resources not allowed by their subscription, then, throttling is the answer for you.

What can be throttled?
In a cloud environment, there are several parameters which can be throttled.
  • Network bandwidth
  • Storage
  • CPU usage
  • I/O operations
Lets see how throttling is used by a real cloud environment. I am considering StratosLive, a complete Open PaaS from WSO2 to describe how it is using throttling.

Throttling in StratosLive
StratosLive presents you the complete middleware platform Carbon from WSO2 in the cloud. Users can create tenants and use the StratosLive cloud environment. It uses throttling to makes sure the users only consume the resources which are allowed to them according to the usage plan they subscribe to. It throttles following parameters.
  • Webapp bandwidth - Tenants can host webapps in WSO2 Application Server. When requests are received and responses are sent, it is checked whether the tenant has permission to consume the bandwidth. If not, i.e. tenant has already consumed the allocated bandwidth, the request will be rejected.
  • Service bandwidth - Same as webapp bandwidth. This applies to the services hosted in StratosLive.
  • Registry bandwidth - This is considered when registry items are accessed by tenants. When a get/put operations is carried out in the registry, a certain bandwidth is consumed. It also undergoes throttling.
  • Registry storage - Tenants are allowed to store artifacts in the registry. But to control the storage consumed, it is throttled.
  • Number of users per tenant - When a tenant is created, tenant admin can add users to the tenant. This can be throttled if needed.
Above mentioned throttling is done based on monthly usage data of tenants. Not only that, there are throttling rules. These rules can be changed on the fly, making StratosLive's throttling capabilities very powerful.

You can read more about throttling in StratosLive from Sanjeewa Malalgoda's blog.

1 comment:

  1. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
    Regards,
    Cloud Computing Courses|Cloud computing course in Chennai

    ReplyDelete