<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://gandikitchen.net/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Gandi Kitchen</title>
  <link>http://gandikitchen.net/</link>
  <atom:link href="http://gandikitchen.net/feed/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>en</language>
  <pubDate>Wed, 13 Feb 2013 13:01:21 +0100</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>SimpleHosting PaaS Platform</title>
    <link>http://gandikitchen.net/post/2012/02/22/SimpleHosting-PaaS-Platform</link>
    <guid isPermaLink="false">urn:md5:09cd6153b39e5dac7f9b079ac53b6553</guid>
    <pubDate>Wed, 22 Feb 2012 15:17:00 -0800</pubDate>
    <dc:creator>Thomas</dc:creator>
        <category>Hosting</category>
            
    <description>&lt;p&gt;We are pleased to write about our new Platform As A Service (PaaS), which we call SimpleHosting. We have been working on this for more than a year, and are integrating the latest versions of component software while maintaining homogeneity with the management framework of our existing Infrastructure As A Service (IaaS) hosting.
&lt;/p&gt;
&lt;p&gt;
Our goal in offering this platform is full abstraction of the system configuration, using our specific knowledge and experience gained from thousands of existing hosting installations. This abstraction then allows you full latitude on the application side, within reasonable limits. We have chosen the limits to be as open as possible by default.
&lt;/p&gt;    &lt;h2&gt;More details&lt;/h2&gt;
&lt;p&gt;
Our first abstracted system image is LAMP hosting: Linux, Apache, MySQL, and PHP. This is the most used combination of applications, but also among the most complicated to handle on a system and security level. Simple Hosting addresses these concerns with its robust architecture and scaling features. The architecture of SimpleHosting contains load-balancers in front of the caching server and in front of your personal instance. The instance is only available using HTTP through the clustered load-balancers, and uses SFTP to store your files. There is no plan to allow direct console access.
&lt;/p&gt;
&lt;p&gt;
What you get is an instance of a Linux system with Apache2, PHP5 and MySQL installed. The files and application resources you place on it are up to you. Remember, this is not shared hosting across multiple customers. Another resource hungry web server will not cripple yours. At the load-balancer and caching server levels, all the virtual hosts are served by a group of machines, but all the data is partitioned.
&lt;/p&gt;
&lt;p&gt;Your instance has only one user, so:&lt;/p&gt;&lt;ul&gt;
 &lt;li&gt; you do not have to do any user rights management &lt;/li&gt;
&lt;li&gt; you  have a dedicated disk where all your data and application error logs are stored&lt;/li&gt; 
&lt;/ul&gt;
&lt;p&gt;
You can use your instance to share privately accessible data using SFTP (through the /private directory).
&lt;/p&gt;
&lt;p&gt;Your instance has a dedicated apache2 daemon, so:&lt;/p&gt;&lt;ul&gt;
 &lt;li&gt; you can get all the data on application state, running queries, error logs, and more using the administration interface &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Your instance has a dedicated PHP daemon, which means:&lt;/p&gt;&lt;ul&gt;
 &lt;li&gt; very few functional limitations as compared to shared hosting &lt;/li&gt;
 &lt;li&gt; you can change the PHP configuration using ini_set(). As the PHP5 interpreter runs as a fastCGI daemon, it performs better and allows greater resource control. Note: Configuring php_value in .htaccess file is disabled, due to fastCGI use &lt;/li&gt;
 &lt;li&gt; We use APC, a PHP opcode cache of 64 MB for size S instance, which is doubled at each larger size. &lt;/li&gt;
 &lt;li&gt; APC and PHP statistics are accessible using the administration interface.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Your instance has a dedicated MySQL daemon:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt; a full daemon to which you have root access &lt;/li&gt;
 &lt;li&gt; data is stored on your disk &lt;/li&gt;
 &lt;li&gt; configuration can be managed using PHPMyAdmin,  available in your administration interface &lt;/li&gt;
 &lt;li&gt; there is no direct access to the MySQL port from outside your instance &lt;/li&gt;
 &lt;li&gt; memory use depends on the configuration of the various instance sizes, which have been set up to avoid swapping. There is no feature difference between PHP/MySQL on the different size packs &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;http://gandikitchen.net/public/paas/paas_schema.png&quot; alt=&quot;&quot; style=&quot;margin: 0 0 1em 1em;&quot; title=&quot;PAAS, as of Feb. 2012&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;PHP and System Details &lt;/h2&gt;
&lt;p&gt;
The instance is based on the Debian Linux distribution with standard upstream packages for the PHP5 interpreter and its modules. To get an exact listing of the version and included modules, see our &lt;a href=&quot;http://wiki.gandi.net/fr/simple/instance_phpmysql &quot; hreflang=&quot;en&quot;&gt;wiki article&lt;/a&gt; or, for the result of a PHPinfo() command, &lt;a href=&quot;http://simple.gandi-test.fr/phpinfo.php&quot; hreflang=&quot;en&quot;&gt;look here&lt;/a&gt;. SimpleHosting is quite similar to servers that are available with our IAAS hosting,  but configured to support a specific kind of web site.
&lt;/p&gt;
&lt;p&gt;
The module list and configuration are set up by our technical team; you cannot install different PHP packages or Apache modules on your instance. However, if we see a significant quantity of requests for a specific module on our &lt;a href=&quot;https://www.gandi.net/hebergement/simple/wishlist/&quot; hreflang=&quot;en&quot;&gt;wishlist&lt;/a&gt;, we may decide to include the requested module or package in subsequent SimpleHosting images.
&lt;/p&gt;
&lt;p&gt;
At the security level, our technical team will regularly update versions of libraries and interpreters on each SimpleHosting image. For example, the patch for the latest PHP5 security alert has already been applied to the LAMP instance. In the case of regular security alerts on PHP or PHP applications supplied by Gandi, our technical team will react quickly and apply fixes as quickly as possible following the announcement. We are monitoring security alerts on the PHP interpreter, on PHPMyAdmin (available in your administration interface), on apache2, MySQL,  and on the base system (Linux kernel, libc6, ...). 
Be advised:  Security alerts concerning the applications you install are of course your responsibility.
&lt;/p&gt;
&lt;h2&gt;Performance&lt;/h2&gt;
&lt;p&gt;
The platform architecture is designed to provide the shortest possible response time at each level:&lt;/p&gt;&lt;ul&gt;
 &lt;li&gt;dedicated memory space : your data stay cached in memory or in MySQL&lt;/li&gt;
 &lt;li&gt;PHP cache: APC, which is really efficient at the large memory sizes we configure&lt;/li&gt;
 &lt;li&gt;HTTP cache: Varnish provides efficient caching of static content to improve response time: pages and images that can be cached are served directly from the cache.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Scaling&lt;/h2&gt;
&lt;p&gt;
This is the harder part to handle. If your site is successful, it may be rendered unavailable to your visitors by virtue of a lot of queries. You will have to take two parameters into account:
&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;HTTP request flow : our Varnish farm is regulating this flow to avoid saturating your instance. If your pages can be cached, this process should be efficient. The quantity of data sent is capped with a quota, to avoid abusive behaviors.&lt;/li&gt;
 &lt;li&gt;Site complexity: Varnish cannot cache every byte of data. For example, if your site contains a lot of PHP pages using cookies, you will have to increase the size of your SimpleHosting instance to handle the query load.&lt;/li&gt;
 &lt;/ul&gt;
&lt;p&gt;
Each size of SimpleHosting instance will start a specific number of PHP process (two for S size, for example). Each process can handle the generation of one dynamic page, and send the result to the visitors browser. For example, you can serve the contents of dynamic pages to two distinct visitors at the same exact time using a size S instance. Static pages are served directly by apache2 processes. 
&lt;/p&gt;
&lt;p&gt;
As generation of dynamic pages consumes CPU and RAM resources, we set up a maximum execution time (see the PHPinfo() output). Once the timeout value is reached, the PHP process will be stopped, and information about why it was stopped will be written to the error log. Your visitor will get an error message as a reply. If this is happening, you will need a larger instance size (for more processes) and/or a longer timeout. If your pages contains errors, you can easily find the information in the PHP error log available in your administration interface at http://&amp;quot;login&amp;quot;.dc0.gpaas.net (&amp;quot;login&amp;quot; is your SimpleHosting login, a short numeric string).
&lt;/p&gt;
&lt;h2&gt;Caching&lt;/h2&gt;
&lt;p&gt;
Generated web pages served up by your SimpleHosting instance are added to a cache by a pool of Varnish servers, to handle heavy traffic by serving data already in the cache to new visitors. Obviously, you have the possibility to completely disable caching on your instance for all pages or one page, or to empty the cache at any time.
&lt;/p&gt;
&lt;p&gt;
Directly in front of cache server, a couple of load-balancers help insure that visitors can reach the website on your instance. These appliances are reachable by a pool of IPV4 addresses associated to a set of names like &amp;quot;gpaasX.dc0.gandi.net&amp;quot;, where X is an integer. IPV6 access is not yet available, due to a lack of hardware support: we are waiting for a new version of a firmware to correct it and allow ful IPv6 access.
&lt;/p&gt;
&lt;h2&gt;Quick comments to finish off this article:&lt;/h2&gt;
&lt;ul&gt;
 &lt;li&gt;storage is provided on a compressed filesystem. The 10 GB feature in the SimpleHosting offer might actually contain much more data. Be careful not to fill it up, nonetheless! &lt;/li&gt;
&lt;li&gt; the LAMP instance is designed to serve web pages and simple PHP apps like Drupal or Wordpress. It's not set up for streaming or large file downloads. Use it for what it is good for, and you will be successful. &lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Mirror server and CentOS</title>
    <link>http://gandikitchen.net/post/2011/12/30/Mirror-server-and-CentOS</link>
    <guid isPermaLink="false">urn:md5:cdc53b6b9b37309cbf82d81b0c524b78</guid>
    <pubDate>Fri, 30 Dec 2011 11:27:00 +0100</pubDate>
    <dc:creator>aegiap</dc:creator>
        <category>Hosting</category>
            
    <description>&lt;p&gt;Information about the CentOS repository on Gandi mirror server.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Local CentOS mirror&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;In order to reconfigure our CentOS mirror repository the way CentOS use it, 
the default version '6' which is currently pointing to the 6.1 version will be 
switch to 6.2 version in the beginning of january (hopefully january the 5th).
With this configuration change, our local CentOS repository will be compliant 
with upstream mirror and customer will be able to easily follow the version of the
6 branch with simple update operations.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;CentOS 6 image&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;Following the release of the &lt;ins&gt;6.2 version&lt;/ins&gt; of CentOS, both 32 bits and 64 bits OS
images on Paris and Baltimore datacenters are now updated with the new version.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Local mirror URL&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;The URL of the official mirror server which contains distributions tree is 
http://mirrors.gandi.net. The index page is listing all the distributions and 
systems availables.&lt;/p&gt;


&lt;p&gt;With Debian, for example, the URL to add to /etc/apt/sources.list is :&lt;/p&gt;
&lt;pre&gt;
deb http://mirrors.gandi.net/debian squeeze main experimental non-free
&lt;/pre&gt;


&lt;p&gt;Older URL like http://centos.mirror.gandi.net/.../ or
http://debian.mirror.gandi.net/.../ are now obsolete and will be removed soon. 
They were setup during the beta step of the IAAS hosting.&lt;/p&gt;


&lt;p&gt;The mirror server is available for virtual server on IAAS hosting and is not 
reachable for servers outside Gandi network.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>What's Happening at the Cloud Expo in Santa Clara?</title>
    <link>http://gandikitchen.net/post/2011/11/14/What-s-Happening-at-the-Cloud-Expo-in-Santa-Clara</link>
    <guid isPermaLink="false">urn:md5:234b45005933749b0f3404944b4913bf</guid>
    <pubDate>Mon, 14 Nov 2011 11:03:00 -0800</pubDate>
    <dc:creator>Thomas</dc:creator>
        <category>Hosting</category>
            
    <description>Gandi's Thomas Stocking went to the Cloud Expo 2011 West in Santa Clara this week, and found that marketing is alive and well in the Cloudsphere. Despite the fluff, there were some interesting ideas getting discussed, and companies developing strategies to leverage the evolving cloudscape...    &lt;br /&gt;&lt;strong&gt;What's Happening at the Cloud Expo?&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;

Attending &lt;a href=&quot;http://cloudcomputingexpo.com/&quot; hreflang=&quot;en&quot;&gt;Cloud Expo 2011 West in Santa Clara&lt;/a&gt; requires a lot of stamina. The conference is a grueling 4 days long, and has a whopping 160 sessions and lectures. Quantity, however, does not always equal quality, and I was a bit underwhelmed by much of what was presented. Enough marketing fluff! I come to conferences to get to the core technical truths. Some interesting ideas were being discussed, of course, but weeding them out of the pitch and jargon was more challenging than I like to put up with. If I want a challenging search, I’ll go geocacheing! &lt;br /&gt;&lt;br /&gt;
Ok, so what were the interesting ideas? Well, for one thing, Open Source (capitalization is mine) is clearly in the forefront of innovation in the cloud space. I spoke with &lt;a href=&quot;http://krishworld.com/&quot; hreflang=&quot;en&quot;&gt;Krishnan Subramanian&lt;/a&gt; who contended in his talk that &lt;a href=&quot;http://www.guardian.co.uk/technology/blog/2010/dec/14/chrome-os-richard-stallman-warning&quot; hreflang=&quot;en&quot;&gt;Stallman got it wrong&lt;/a&gt; and that cloud technology is not evil, or inimical to Open Source, and in fact that Open Source is a necessary counterpoint to the imminent consolidation of cloud vendors for the enterprise space. I thought it was interesting that Krishnan is admitting that companies (&lt;a href=&quot;http://www.rackspace.com/&quot; hreflang=&quot;en&quot;&gt;Rackspace&lt;/a&gt; for instance, with the release of &lt;a href=&quot;http://www.openstack.org/&quot; hreflang=&quot;en&quot;&gt;OpenStack&lt;/a&gt;) are going to be developing Open Source, rather than relying on individual users to find and fix bugs. This means the Open Source software development model will change from the “with enough eyeballs, all bugs are shallow” to a company-sponsored community feedback model. That’s not the “free software” model Stallman is talking about, but it’s still a viable one, or at least innovators had better hope it is. &lt;a href=&quot;http://www.greenqloud.com/&quot; hreflang=&quot;en&quot;&gt;Greenqloud&lt;/a&gt; CEO Eirikur Hrafnsson was there, and we talked a bit about the relative merits of &lt;a href=&quot;http://cloudstack.org/&quot; hreflang=&quot;en&quot;&gt;CloudStack&lt;/a&gt; and OpenStack, which Greenqloud is enhancing for use in it's environmentally optimized data centers. &lt;br /&gt;&lt;br /&gt;
Speaking of community development, it seems like there is a fair amount of thought going into this as well, with cloud computing offering some unique opportunities to leverage data that users input, or at least &lt;em&gt;the way they use the data&lt;/em&gt;. In the traditional model of client-deployed software, the poor lonesome developers really had no easy way to see what the users were actually doing with their software, whereas if the users access a hosted solution, common use cases become obvious in the usage patterns.  A SaaS vendor who can detect and capture this data can quickly adjust a difficult workflow, for example. &lt;a href=&quot;http://www.boomi.com/&quot; hreflang=&quot;en&quot;&gt;Dell Boomi&lt;/a&gt;, a hosted solution for mapping data exchanges and workflows between enterprise applications, leverages the fact that their SaaS is actually a shared model, and so the data for such things as field mappings that users input can be used to “suggest” field mappings based on work done by other users. Cloud vendors could do the same but would need to do more to harvest that data across multiple instances. It’s easy to see how this helps developers and product managers do more to select popular features for focused development. Gandi does that: we choose the packages for the &lt;a href=&quot;http://www.gandi.net/hebergement/simple&quot; hreflang=&quot;en&quot;&gt;Simple Hosting&lt;/a&gt; offering based on what our cloud hosting customers are choosing most often. &lt;br /&gt;&lt;br /&gt;
On the show floor there were many examples of what I’ll term epiphytic businesses. Players like &lt;a href=&quot;http://www.terremark.com/default.aspx&quot; hreflang=&quot;en&quot;&gt;Teremark&lt;/a&gt; and &lt;a href=&quot;http://www.phoenixnap.com/&quot; hreflang=&quot;en&quot;&gt;PhoenixNap&lt;/a&gt; offer added value on top of VMware hosting technology. They pay VMware for that in license fees, of course. Terremark scored big by getting GSA listing and tapping into the billions pledged by the federal government to Cloud Computing, which is probably one good reason why &lt;a href=&quot;http://www.datacenterknowledge.com/archives/2011/04/11/verizon-completes-acquisition-of-terremark/&quot; hreflang=&quot;en&quot;&gt;Verizon Business bought them&lt;/a&gt;. Lest you be an American taxpayer and think this is yet another boondoggle, the case is really good for consolidation of many, many redundant federal data centers.&lt;br /&gt;&lt;br /&gt;
Apparently the hunt for differentiation on the basic value proposition of cloud computing is still going on, and some vendors are striking pay dirt. Other epiphytic businesses tackle areas that are key to cloud adoption, but that the main cloud technology providers don’t really want to mess with, like enhanced security, or end user support. &lt;a href=&quot;http://www.cloudpassage.com/&quot; hreflang=&quot;en&quot;&gt;CloudPassage&lt;/a&gt; has a way of dealing with security using agents deployed to instances. &lt;a href=&quot;http://www.perspecsys.com/&quot; hreflang=&quot;en&quot;&gt;Perspecsys&lt;/a&gt; has a middleman security scanner that aims to protect data in the cloud from sloppy or compromised user systems. &lt;a href=&quot;http://www.appriver.com/&quot; hreflang=&quot;en&quot;&gt;Appriver&lt;/a&gt; provides desperately needed end-user support and front-end sales to Microsoft’s nacent Office 360 packages. &lt;br /&gt;&lt;br /&gt;
Some of these business are dependent on the “mother” technology vendor, and others, trying to defend themselves from this risk are building interfaces to all the providers they judge to have staying power. One such is a cloud management platform called &lt;a href=&quot;http://www.abiquo.com/&quot; hreflang=&quot;en&quot;&gt;Abiquo&lt;/a&gt; that gives you a nice gui (of course) as well as an API on top of “all the major cloud vendors” offerings. This app lets you build, migrate, and monitor virtual data centers with your installed private and public clouds (where have I heard this before?). &lt;br /&gt;&lt;br /&gt;
Good ideas are being bought: &lt;a href=&quot;http://www.gluster.org/&quot; hreflang=&quot;en&quot;&gt;Gluster&lt;/a&gt;’s cloud-based storage clustering solution was acquired by Redhat,  and this made many sit up and take notice, I’m sure. Redhat has also entered the PaaS fray with &lt;a href=&quot;http://www.redhat.com/solutions/cloud/openshift/&quot; hreflang=&quot;en&quot;&gt;OpenShift&lt;/a&gt;, which will presumably allow them to take advantage of the great work done to manage linux packages and, of course the JBOSS Java EE framework. Perhaps Gluster’s sauce will make that meat more savory?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;

&lt;strong&gt;What’s Still Missing?&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;

Cloudbursting remains elusive, that is, the true, automated ability to augment private cloud capacity with public cloud resources to achieve higher scale for short periods. 
&lt;br /&gt;
Standards are lacking. APIs abound, like Amazon’s API for EC2, and despite efforts of well-intentioned people in places like the Open Data Center Alliance to come up with shared and complete models for us to work with, it will be a while before we settle on one (or two, or three) standards.
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;strong&gt;What's Next for Gandi in the US?&lt;/strong&gt;
&lt;br /&gt;&lt;br /&gt;
We are going to keep developing out cloud hosting offering at Gandi SAS, and Gandi US is going to make sure the American customers get excellent support. We will be expanding our US presence, so look for us in your town! See you at the &lt;a href=&quot;http://www.usenix.org/events/lisa11/index.html&quot; hreflang=&quot;en&quot;&gt;LISA conference&lt;/a&gt;  in Boston in December! Happy computing.</description>
    
    
    
      </item>
    
  <item>
    <title>When Null0 and BGP May Cause Problems</title>
    <link>http://gandikitchen.net/post/2011/06/20/When-Null0-and-BGP-May-Cause-Problems</link>
    <guid isPermaLink="false">urn:md5:1d946df758643d123f2badda64cbda67</guid>
    <pubDate>Mon, 20 Jun 2011 09:10:00 +0200</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Network</category>
        <category>BGP</category><category>Nertwork</category><category>Peering</category><category>Routing</category>    
    <description>&lt;p&gt;If you read any networking textbook or study guide on the subject of BGP and route stability, very often you will find a mention or even a suggestion to tie your aggregated prefix to null0 to ensure that the prefix is remains in the routing table thereby increasing the stability of your BGP advertisements.&lt;/p&gt;
&lt;p&gt;While this is a good thing, to a certain extent, there are situations where such a configuration may lead to service interruption in case of an outage.  This quick article talks a little about internet routing using BGP and some &amp;quot;common practices&amp;quot;.&lt;/p&gt;    &lt;p&gt;Let us take the following simplified pair of autonomous systems as an example. On the left, AS 1 and on the right AS 2;  These two networks have connectivity to the internet as well as a direct peering relation between them.  Under normal circumstances, the traffic between the client in AS1 and the server in AS2 will follow the shortest AS-Path which in this case will be over the peering session.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gandikitchen.net/public/routing-null0/null0-1.png&quot;&gt;&lt;img src=&quot;http://gandikitchen.net/public/routing-null0/.null0-1_m.jpg&quot; alt=&quot;&quot; style=&quot;margin-top: 0; margin-right: auto; margin-bottom: 0; margin-left: auto; display: block; &quot; title=&quot;Routing Image 1, juin 2011&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this example, the routers have static routes to null0 to 'pin' up the prefixes that they advertise in BGP for their respective ASNs.  The only significant difference in this example between the two networks, is that the connectivity between R2 in AS1 and the rest of the AS1 network has a single connection.  After all, it is just a peering router, and less critical than central core and internet transit, right?  Well, let's have a look for a moment.&lt;/p&gt;
&lt;p&gt;Let us imagine that the connectivity between R2 and the rest of the AS1 network is severed.  The routes to the network in AS 2 will then only be seen via the internet across the transit connection, as seen in the BGP advertisements.  Under correct configuration, traffic between the two networks should now be flowing via the Internet across their respective transit connections, as in the following diagram.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gandikitchen.net/public/routing-null0/null0-2.png&quot;&gt;&lt;img src=&quot;http://gandikitchen.net/public/routing-null0/.null0-2_m.jpg&quot; alt=&quot;&quot; style=&quot;margin-top: 0; margin-right: auto; margin-bottom: 0; margin-left: auto; display: block; &quot; title=&quot;Routing Image 2, juin 2011&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;&lt;p&gt;In this example, however, R2's connection to the peering session between the two ASNs is still active, and as such the BGP session is still active between the two.  Since R2 has statically 'pinned' the network prefixes via a route to null0, these prefixes are still advertised to R3 in AS 2.  &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;As a result, the return traffic, following the shortest AS-path, will be sent via R3 to R2.  Unfortunately, due to the break in connectivity between R2 and the rest of its network, the client destination is unreachable, resulting in a partial &amp;quot;black hole&amp;quot; instigated by the break in connectivity and exacerbated by what is likely to be either an administrative &amp;quot;oversight&amp;quot;, or a lack of understanding of the network topology at the time of configuration.&lt;/p&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://gandikitchen.net/public/routing-null0/null0-3.png&quot;&gt;&lt;img src=&quot;http://gandikitchen.net/public/routing-null0/.null0-3_m.jpg&quot; alt=&quot;&quot; style=&quot;margin-top: 0; margin-right: auto; margin-bottom: 0; margin-left: auto; display: block; &quot; title=&quot;Routing Image 3, juin 2011&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;So how can we mitigate this problem?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;There are three primary ways in which this problem can be mitigated.  The first method would involve adding a separate redundant connection from R2 to the rest of the AS 1 network (similar to that visible on R3 in AS 2 in the above diagrams), thereby mitigating (or at least reducing, while not completely eliminating) the risk of R2 becoming isolated and generating the partial black hole in the first place.  Depending on the distance and geographic location of R2, however, this may prove to be costly.&lt;br /&gt;&lt;br /&gt;An alternative would be to tie the aggregated prefixes only in the core (which itself should already have redundant connectivity between the critical equipment), and advertise these with an internal routing protocol, such as OSPF or IS-IS, to the rest of the the border devices.  &lt;/p&gt;
&lt;p&gt;As a result here, if R2 loses connectivity to the rest of the AS1 network, it no longer receives the internal protocol advertisements for the aggregated prefixes, and since these prefixes are no longer in the routing table of R2, it will cease to advertise them to any peers in BGP.  As a result, the return traffic from AS 2 to AS 1 would follow the only remaining path via the internet across the transit connections.&lt;/p&gt;
&lt;p&gt;The third alternative involves more complex configuration, and of course assumes a dynamic internal routing protocol within the AS.  Under this scenario, the BGP advertisements would be conditioned on the existence (or non-existence, according to preferences) of another prefix in the routing table; this other prefix being received via the internal routing protocol.  This is sometimes referred to as &amp;quot;BGP Conditional Route Injection&amp;quot;.  On Cisco equipment, this involves using advertise-maps within the BGP configuration, and there is documentation on this available on &lt;a href=&quot;http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a0080094309.shtml&quot;&gt;Cisco's website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Aside from these methods, a fourth possibility would be to bind the static routes to null0 against a track object which in turn is associated with an IP SLA monitor.  For example, the router can be configured to regularly poll an IP address elsewhere within the network either via PING or another protocol.  By binding the this IP SLA monitor and track object against the static route to null0, this static route will remain in the routing table only if the IP SLA monitor returns successful.  (Thresholds may be configured as well to guard against transient false negatives...)  If the SLA monitor fails, then the route is withdrawn from the routing table, and thereby suppressing the prefix from being advertised in BGP.&lt;/p&gt;
&lt;/div&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Storage Migration</title>
    <link>http://gandikitchen.net/post/2011/05/05/Storage-Migration</link>
    <guid isPermaLink="false">urn:md5:3f2ae3e8d95ae83f22c092051711d25e</guid>
    <pubDate>Thu, 05 May 2011 15:09:00 +0200</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Hosting</category>
        <category>API</category><category>Hosting</category><category>snapshot</category>    
    <description>&lt;p&gt;For the past few months perhaps you might have made use of the servers in the US.  The changes in the storage technology was one of the strong points in the hosting infrastructure.  Prior to this, we had to adapt the infrastructure so that it could understand &amp;quot;n&amp;quot; datacenters.  The implementation of this new storage platform was not as complicated as it seems since it is completely independent to the architecture in France.  With a new datacenter, it was therefore quite a trivial matter to build from scratch, and all of the new servers in the US made use of this new platform from day one.&lt;/p&gt;    &lt;p&gt;On the French side, an inevitable migration was required in order to arrive at a standardised platform to utilise the new functionalities.  Here, however, the problem is different and a little more complicated, with the coexistence of two different storage solutions.  In reality, we were confronted with a number of challenges so that the machines hosting the servers could happily play ball with two different storage platforms at the same time.  The opening of our US datacenter was already a few months ago, and so a large proportion of our efforts have been dedicated to this migration.  This is, of course, proceeding and certainly takes [a lot of] time, and will soon be available to all of our customers.  We will thus be in a position to run the two storage platforms together in order to perform the migrations efficiently.&lt;/p&gt;
&lt;p&gt;Once active, all new disk creations will take place on the new storage platform.  At this point we will enter the migration phase, and specifically the phase which directly impacts you since it also means the migration of your disks.&lt;/p&gt;
&lt;p&gt;There are a number of ways to perform the migration:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Create a new disk:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The creation of this new disk will be on the new platform.&lt;/p&gt;
&lt;p&gt;Next, simply attach this new disk to your server and copy the relevant data to the new disk.  This would be a good occasion to do some housekeeping and get rid of any old data that you no longer need.  Such commands as 'cp' or 'rsync' would do the job nicely.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Create a new disk from the image of an existing one:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This function has been available through the API for several months:  disk.create_from(apikey, disk_spec, src_disk_id) -- see the API documentation for more details at &lt;a href=&quot;http://doc.rpc.gandi.net/hosting/reference.html#disk.create_from&quot;&gt;http://doc.rpc.gandi.net/hosting/reference.html#disk.create_from&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The next Gandi Website update will include the ability to create a new disk from and existing one to make life easier for you if you are not a user of our API.  This method, nevertheless, requires either that the server that has the original disk attached be stopped, or that the disk be detached from the server.&lt;/p&gt;
&lt;p&gt;Please note that the time take to make the copy will be directly dependent upon the size of the disk, so you should have some patience and/or a good coffee break, if you decide to employ this method on a comparatively large disk.&lt;/p&gt;
&lt;p&gt;If the new disk is to be a system disk, then you will need to define the disk as a boot-disk either via the web interface (&amp;quot;Boot Disk&amp;quot; in the server details) or using the API :  vm.disk_attach(apikey, vm_id, disk_id {'position' : 0} )  ( see &lt;a href=&quot;http://doc.rpc.gandi.net/hosting/reference.html#vm.disk_attach&quot;&gt;http://doc.rpc.gandi.net/hosting/reference.html#vm.disk_attach&lt;/a&gt; )&lt;/p&gt;
&lt;p&gt;This migration will enable you, among other things, to make use of the new storage features such as snapshots, resizing, and rapid-copy, which will be available in the coming weeks.  Aside from the platform which is seeing new features every month, we hope to soon be able to talk to you about these new functions which may change the way you use your servers.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>New storage infrastructure</title>
    <link>http://gandikitchen.net/post/2010/12/24/New-storage-infrastructure</link>
    <guid isPermaLink="false">urn:md5:9e3dd884dcd12e0fd21a308cd905fcc6</guid>
    <pubDate>Mon, 24 Jan 2011 23:42:00 +0100</pubDate>
    <dc:creator>William</dc:creator>
        <category>Hosting</category>
            
    <description>&lt;p&gt;Our new storage infrastructure is being deployed.&lt;/p&gt;


&lt;p&gt;Disk Management is now handled through virtualization... and we are excited to share it with you!&lt;/p&gt;    &lt;p&gt;As you will be seeing, the features are very interesting and we will be integrating them over time in your management interface as well as in the new API.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Improvements&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;Besides the disks, still using RAID for redundancy and a write cache resistant to a power failure, the storage servers are now organized in clusters: in case of controller failure, a standby controller is ready to take over the management of disks.&lt;/p&gt;


&lt;p&gt;The storage capacity has been improved as well as disk I/O. Moreover, you will be soon able to create larger disks.&lt;/p&gt;


&lt;p&gt;Creating, copying and resizing disks will be faster and more automated.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Snapshot&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;This mechanism enables you to create a snapshot of your disk that is either in use or detached.
The snapshot can be used to achieve a consistent backup of your disk.
Within a few weeks, a snapshot on demand will be available.
We are also working on periodic management of snapshots. For example the ability to create a snapshot every day and only the last seven.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Copying disk&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;Thanks to the snapshots, it will be possible to create a fast and live copy of your disk, even with activity on it.
This feature will facilitate fast deployment (clone) of servers.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Rollback&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;From a snapshot you will be able to create a disk, getting back your lost data or apply a rollback operation on your disk.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Automatic backup drive&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;A backup system, disk to disk, will be available in the future; we are still working on the specifications.
For most of you, the snapshot mechanism will probably fulfill your needs.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Disks and Partitioning&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;Gandi disks are logical drives, meaning that we provide an access to disk already optimized, secured; it is easy to create new one, resize or delete them.&lt;/p&gt;


&lt;p&gt;The partitions, or RAID algorithms are for your virtual machine, at best an unnecessary overhead, and at worst a reorganization of disk accesses that can result in performance degradation (see below). In addition, you can deprive yourself of convenient features: a snapshot made on a disk that is part of a RAID has no interest, resizing a partitioned drive (our old system) is complex even dangerous if not made carefuly.&lt;/p&gt;


&lt;p&gt;Like with SSD and new hard disks, blocks are not 512 bytes long anymore but 4KB.
If you are using partitions, access to your data may not be aligned, and performance divided by three.&lt;/p&gt;


&lt;p&gt;Partitions are helpful for physical disks. This complicates the management of your disks for nothing: consolidate your data on a single disk or create multiple data disks is the right solution.&lt;/p&gt;


&lt;p&gt;The disks created by Gandi will no longer use partitions. Currently only the system disks have a default partition (system and swap): it will disappear. The system disk will be managed like any other disk, which will facilitate management. To keep the same level of service, we will provide a temporary disk for swap. To remain consistent with the current configurations, we will emulate virtual partitions to present the system disk and swap: the system will be seen as xvda1, the swap as xvda2, like on the current system but it will be two different disks.&lt;/p&gt;


&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;Note that the new storage infrastructure is available form the beginning in our Baltimore data center; features will be along the time.&lt;/p&gt;


&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Operation Dragonfly - Next Generation Gandi Network</title>
    <link>http://gandikitchen.net/post/2011/01/22/Operation-Dragonfly-Next-Generation-Gandi-Network</link>
    <guid isPermaLink="false">urn:md5:bd2e885fe8301f670fb4d4fb1f795d28</guid>
    <pubDate>Sat, 22 Jan 2011 22:21:00 +0100</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Network</category>
            
    <description>&lt;p&gt;As most of you may have already noticed over the past 18 months, there have been several periods of scheduled maintenance on the Gandi network.  Some of these have been fairly intrusive, while others have taken place quietly behind the scenes.    I have made a number of innuendos here on the Gandi Kitchen and also on the Gandi Bar over the past year dropping hints about some of the things to come, so I decided to take this opportunity to reveal a little more about what our network operations team here at Gandi is up to and what it means for you over the coming months.&lt;/p&gt;


&lt;p&gt;Why are we calling this &amp;quot;Operation Dragonfly&amp;quot; ?? well.. that is for you to try to guess!  We will be giving a Gandi T-Shirt to the &lt;strong&gt;first five people&lt;/strong&gt; who find the link/significance of the name of this project, and send us a short one paragraph description of this significance by email to &lt;em&gt;dragonfly AT gandi DOT net&lt;/em&gt; :)  Contest ends on 14 February 2011 when the first five people to send us a correct answer will be sent their Gandi T-Shirts! &lt;em&gt; (Please include your size and address in your email so that we know where to send it to, and to make sure we don't send you one for a Barbie doll!)&lt;/em&gt;  Oh .. and before I forget, there are a &lt;strong&gt;few subtle hints&lt;/strong&gt; embedded throughout this article to help you, and after the end of the competition we will also reveal the clues for everyone !&lt;/p&gt;    &lt;p&gt;&lt;br /&gt;&lt;/p&gt;


&lt;h3&gt;A Bit of History&lt;/h3&gt;


&lt;p&gt;The current Gandi network has grown organically over the course of the past ten years, with everything starting from a relatively simple &amp;quot;flat&amp;quot; design.  Over time, as more and more services and features were added to the Gandi product lineup, the network has had to be extended to keep up with the product innovations.  Most notable in this gradual expansion has been the extension of the network across multiple datacenters, and the desire to maintain resilience across multiple sites.&lt;/p&gt;


&lt;p&gt;Because of the relatively &amp;quot;flat&amp;quot; nature of the original network, and the desire for layer-2 adjacency across multiple datacenters, one of the simplest ways to provide this cross-site adjacency was to simply &amp;quot;span&amp;quot; or &amp;quot;trunk&amp;quot; the relevant LAN segments cross the different sites.  While this is relatively efficient for a small network, with only a couple of sites to worry about, it becomes rapidly less and less efficient and drastically more cumbersome to continue this approach for very long.  This is perhaps where we went astray several years ago.&lt;/p&gt;


&lt;p&gt;In 2008 we realised that although the various pieces of routing and switching equipment in the network had &amp;quot;names&amp;quot; as if they were part of a structured hierarchical network model, this in fact turned out not to be the case because we found ourselves with a network infrastructure with six core switch/routers and numerous distribution aggregation routers, across four different sites -- all with the same network segments spanned/trunked through the core to all layers of the network.  The result of this is a nightmare to manage and diagnose troubles related to spanning tree and odd routing behaviour.&lt;/p&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;


&lt;h3&gt;The Origins of Operation Dragonfly&lt;/h3&gt;


&lt;p&gt;In addition to simply the network architecture itself, much of the equipment was starting to show signs of age and was not capable of features that were now required in order to further expand and improve Gandi's services.  Therefore, starting in 2009, we set out to modernise and restructure the network to meet not only the current needs of the Gandi services, but also our future needs for the next three to five years, both here and France and internationally.&lt;/p&gt;


&lt;p&gt;The first step was to consolidate inter-site connectivity, which until that point was using multiple trunked VLANs across dark-fibre connections.  We retained the dark fibre, of course, but migrated to wavelength multiplexing to provide different point to point connectivity between equipment across the dark fibre links.&lt;/p&gt;


&lt;p&gt;The challenge that we have with any major network restructuring activities is making the changes without drastically impacting the Gandi services at the same time.  Certain services require a near 100% uptime to ensure correct operations and synchronisation and simply going around ripping out cables en-masse and reinstalling new equipment is not really feasible in an environment where high-availablity is required.  This is why this work has been taking so long to accomplish, and we have been doing it piece by piece over the course of nearly two years.&lt;/p&gt;


&lt;p&gt;Nevertheless, we must continue to salvage and maintain the services, whilst we move forward at full speed towards the exciting new features that will be implemented over the course of the next year.  &lt;em&gt;For the sailors among you, we just had to overhaul the outboards !&lt;/em&gt;&lt;/p&gt;


&lt;p&gt;In September 2009, we upgraded the core switch processors from the Cisco Sup32 platform to the Sup720 3BXL platform.&lt;/p&gt;


&lt;p&gt;The next step in November 2009 was the rejuvenation of the old Cisco 6500 platforms we had in the distribution layers of the network at our datacenters in St. Denis, migrating these from the old Supervisor-2A platforms to the Cisco Virtual Switching System 1440  (VSS).  We also began deploying MultiProtocol Label Switching (MPLS) technology across the core of our network in order to ultimately provide traffic engineering and eventually innovative ways of interconnecting remote network segments together across our network core.
&lt;br /&gt;&lt;/p&gt;


&lt;h3&gt;International Goals&lt;/h3&gt;


&lt;p&gt;With the expansion of Gandi's network, not only here in France, but also internationally, we had to overcome a challenge of how to adapt the legacy network infrastructure to something scalable and capable of handling our international requirements both in terms of internet connectivity and for eventually datacenters on the other side of the Atlantic.&lt;/p&gt;


&lt;p&gt;Any network architect will tell you that a scalable network is modular and hierarchical.  This has been one of the guiding principles of network infrastructure design for many years, and still holds true today.  Cisco calls this the &amp;quot;three-layer network model&amp;quot;.  Over the past few years, however, this has become a little more complex with virtualisation and service-oriented architectures where the service becomes part of the network itself.  Nevertheless, practically all large scale network infrastructures in operation today follow a hierarchical and modular architecture model.&lt;/p&gt;


&lt;p&gt;With the expansion of Gandi to the north-american continent, we needed to ensure resilient connectivity between the datacenters.  A simple rule of thumb applies here -- each datacenter is connected to at least two other datacenters via diverse connectivity paths.&lt;/p&gt;


&lt;p&gt;This past year, we built the datacenter in Baltimore, and this datacenter is now fully operational for the Gandi Hosting platform.  Over the course of the coming months, a number of the other Gandi systems will be available in Baltimore as well -- most notably DNS and the Gandi Website.&lt;/p&gt;


&lt;p&gt;As of the end of 2010, our international connectivity also included additional peering capacity in London, Amsterdam, and Ashburn Virginia/Washington DC -- more to come over the course of the next couple of years!&lt;/p&gt;


&lt;p&gt;&lt;br /&gt;&lt;/p&gt;


&lt;h3&gt;What's Next?&lt;/h3&gt;


&lt;p&gt;We have accelerated the network engineering activities since the beginning of 2011 and over the next few months there will be a number of highly-intrusive maintenance activities undertaken with the objective of finalising Operation Dragonfly before the end of the first half of 2011.&lt;/p&gt;


&lt;p&gt;The first part of this final phase took place last weekend, at St. Denis, where we finally and definitively removed the &amp;quot;spanned/trunked&amp;quot; LANs between the distribution/aggregation and core layers of the network in St. Denis.  As a result of this move, any &amp;quot;issue&amp;quot; in the access or distribution layers of the St. Denis network segments will have no impact on the routing core of the Gandi network in that location.  Next we have to do the same thing at Telehouse2, which is a little more complex!&lt;/p&gt;


&lt;p&gt;Over the course of the next few weeks, you will see a number of scheduled maintenance periods during which we will perform pretty much the rest of the necessary activities in support of this three-year project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Closure of our point of presence at Paris Telehouse-1 (Jeuneurs)&lt;/li&gt;
&lt;li&gt;Updating of a number of critical Gandi services to make use of new hardware and software technologies.&lt;/li&gt;
&lt;li&gt;Implementation of Anycast and Content Delivery technologies for a number of services to include DNS and the Gandi Website across all of our datatenters both in Europe and in the US.&lt;/li&gt;
&lt;li&gt;Complete upgrade and re-installation of the Gandi services at Paris Telehouse-1 (Voltaire) with inter-site resilience and interoperability.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;



&lt;h3&gt;What Will it Look Like?&lt;/h3&gt;


&lt;p&gt;The new Gandi network infrastructure will resemble something like the diagram below (though this is somewhat simplified).  The key elements here is that the architecture is designed and build for resilience, modularity, and ultimate expansion… it's pretty elementary after all… As Mickey Mouse once said… &amp;quot;Arithmetic is being able to count to twenty without taking off your shoes&amp;quot;.  ;)
&lt;br /&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://gandikitchen.net/public/dragonfly/dragonfly-architecture.png&quot;&gt;&lt;img src=&quot;http://gandikitchen.net/public/dragonfly/.dragonfly-architecture_m.jpg&quot; alt=&quot;Dragonfly Architecture&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;Dragonfly Architecture, jan 2011&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>New kernels available for your server.</title>
    <link>http://gandikitchen.net/post/2011/01/17/New-kernels-available-for-your-server</link>
    <guid isPermaLink="false">urn:md5:403c30454e096687af507d3d907fa7b9</guid>
    <pubDate>Mon, 17 Jan 2011 16:32:00 +0100</pubDate>
    <dc:creator>aegiap</dc:creator>
        <category>Hosting</category>
        <category>hosting</category><category>kernel</category>    
    <description>&lt;p&gt;The kernel list on Gandi hosting grows. You have now the choice to use a 2.6.36 or a 2.6.32 with the &lt;a href=&quot;http://grsecurity.net/&quot; hreflang=&quot;en&quot;&gt;grsecurity&lt;/a&gt; patch.&lt;/p&gt;    &lt;p&gt;Gandi hosting allow customer to choose from a pool of patched  and built kernels from Gandi team. Three new kernels have been added to the available kernel list :&lt;/p&gt;


&lt;h2&gt;2.6.36 in x86_32 and x86_64&lt;/h2&gt;


&lt;p&gt;The Linux kernel is in active development : new versions containing features and bugfixes are published on a regular basis. We have prepared new build in 32 bits and 64 bits of the 2.6.36 kernel with D.Kipper patch about additional memory managment. Moreover the feature of resizing an online disk attached to a server is now merged into the kernel. The feature will arrive soon in the hostinig interface.&lt;/p&gt;


&lt;h2&gt;2.6.32 in x86_64 with grsecurity patch&lt;/h2&gt;


&lt;p&gt;Previous kernels allowed customers to setup security solution in the server system (thanks to selinux for example). When choosing this new 2.6.32 kernel you should be able to setup an advanced security policy thanks to &lt;a href=&quot;http://grsecurity.net/&quot; hreflang=&quot;en&quot;&gt;grsecurity&lt;/a&gt; in version 2.1.14-201005151340. The kernel allow disk replication thanks to &lt;a href=&quot;http://www.drbd.org/&quot; hreflang=&quot;en&quot;&gt;DRBD&lt;/a&gt; in version 8.3.8 which was not yet merged in the upstream source tree (integrated since the 2.6.33).&lt;/p&gt;


&lt;p&gt;You can check the &lt;a href=&quot;http://wiki.gandi.net/en/hosting/kernel_changelog&quot; hreflang=&quot;en&quot;&gt;changelog&lt;/a&gt; of Gandi kernels and the &lt;a href=&quot;http://wiki.gandi.net/en/hosting/troubleshooting/update-kernel-modules&quot; hreflang=&quot;en&quot;&gt;process&lt;/a&gt; to update kernel modules according to your selected kernel.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Gandi Hosting : US and France Datacenters FAQ</title>
    <link>http://gandikitchen.net/post/2010/12/23/Gandi-Hosting-%3A-US-and-France-Datacenters-FAQ</link>
    <guid isPermaLink="false">urn:md5:710beaf04b2c3148986f7b327d4180d4</guid>
    <pubDate>Thu, 23 Dec 2010 14:33:00 +0100</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Hosting</category>
        <category>hosting</category>    
    <description>With the opening of our Baltimore datacenter, we have decided to provide a quick FAQ to respond to a few of the commonly asked questions about the hosting product and how it will work with the two datacenters, as well as some of the other features that we are putting in place.
&lt;br /&gt;&lt;br /&gt;If you have any questions not addressed here, then please feel free to let us know!    &lt;strong&gt;&lt;br /&gt;&lt;br /&gt;Q: Can I migrate my server automatically from Paris to Baltimore, or vice-versa?&lt;/strong&gt;
&lt;br /&gt;
A: No; there is no automatic solution to migrate a virtual server between the Paris and Baltimore datacenters due to technical limitations (IP addressing, platform differences, etc.)
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: Okay, but I really want to migrate my server... how can I do it ?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A:  If you are really sure, then there are a couple of ways to do it.
&lt;br /&gt;
Firstly you will need to create a new server through the admin interface (or public API).  You will then need to transfer the data from the old server to the new one.
&lt;br /&gt;
&lt;br /&gt;
For Gandi AI, you will need to save the source files for your website and export the database, for example, with PHPMyAdmin, and then import these on the new server.
&lt;br /&gt;
&lt;br /&gt;
If your server is running in expert mode, it is possible to transfer these files directly over SSH.
Another method, again in expert mode, involves creating a new server with a data disk in the target datacenter, and transfer the system disk from the old server to the newly attached data disk of the new server (for example, with 'dd' but please note that this may take some time).
&lt;br /&gt;
&lt;br /&gt;
Finally you can then change the disk type from data to system via the admin interface in the advanced configuration for the disk, shut down the new VM, remove the old system disk and attach this new image as the new system disk, then start the VM.
&lt;br /&gt;
&lt;br /&gt;
There are a few methods to achieve this:
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;With 'dd/gzip':&lt;/strong&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;p&gt;dd iflag=direct bs=8k if=/dev/xvdYX | gzip -9 | ssh baltimore-server  &amp;quot;gzip -d | dd bs=8k of=/dev/xvdYx&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;With 'mbuffer':&lt;/strong&gt;
&lt;br /&gt;
&lt;br /&gt;
1. First start the target on the Baltimore server:
&lt;br /&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;p&gt;mbuffer -q -s 128k -m 8M -I &amp;lt;baltimore_server&amp;gt;:&amp;lt;port&amp;gt; | gzip -d
| dd bs=8k of=/dev/xvdYX&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Start the sender on the Paris server:
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;p&gt;dd iflag=direct bs=8k if=/dev/xvdYX | gzip -9 | mbuffer -q -s 128k -m 2M -0 &amp;lt;baltimore_server&amp;gt;:&amp;lt;port&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;With 'rsync':&lt;/strong&gt;
&lt;br /&gt;
You can simply copy the files that you need.
&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;code bash&quot;&gt;    rsync -arvz src baltimore_server:/dst&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: Can I detach the IP address from my Paris server and attach it to my Baltimore server?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: No; the IP address allocations and the server provisioning systems for the two datacenters are completely independent.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: Can I attach a disk in the Paris datacenter onto my server in the Baltimore, for example, to make an off-site backup?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: No; for the same reasons that an automatic migration between datacenters is not possible, the two platforms are completely independent.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: I see that Gandi will be deploying Anycast DNS servers, will this allow me to do geolocalization for my servers?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: No; the anycast DNS servers simply give a physical presence for the Gandi DNS servers in multiple locations so that DNS lookup requests can be answered by the closest server.  The DNS service does not provide any geolocalization capability.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: Can I have a server in Paris and another one in Baltimore and use anycast to allow the closest server to serve the content?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: No, because the hosting platforms are independent of each other and use separate IP allocations.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: I have my own ASN and assigned /24 for Anycast purposes, can I use a Gandi VPS to host my anycast service, assuming that I use other providers to expand the geographic and network scope?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: It is technically possible to do this under certain conditions; We have already tested such a solution, but it is entirely bespoke and has certain limitations concerning how your own IP block can be used on your VM. You will need to discuss your requirements with our technical team to determine if we can accommodate your requirement.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: Why when I traceroute from my Paris to my Baltimore server, do I have a 92ms latency all of a sudden?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: Latency is defined as the one-way path delay between two points on a network.; What you see in a traceroute is the round-trip delay for the hop in question (&lt;em&gt;with a special exception for hops contained within an MPLS label-switched-path -- see the next question&lt;/em&gt;)
&lt;br /&gt;
&lt;br /&gt;
Transatlantic latency plus the physical fiber cable distances incur a one-way path delay of roughly 45ms (plus or minus a little). While it is true that at the speed of light the delay to cross the Atlantic is only in the order of 28ms in a straight line, you need to add in the factors of ocean depth, and then the land-based cable distances between the two end locations. This translates to a round-trip delay of at least 90ms, thus this is normal.
&lt;br /&gt;
&lt;br /&gt;
(This is a simplified explanation, as there are actually a number of factors that determine the delay observed, and we would be happy to discuss these with those who are &lt;strong&gt;&lt;em&gt;really&lt;/em&gt;&lt;/strong&gt; interested in the nitty gritty details...)
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: When I traceroute from my Paris to my Baltimore server, I reach a router which is still in Paris but shows a 92ms round-trip time, even though the hop just before it is only 1ms. Doesn't this point to a problem on your network?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: Our network is running MPLS (MultiProtocol Label Switching) in the core, with Traffic Engineering (TE) enabled.  As such, when a packet crosses the network and enters a known end-to-end pathway between two endpoints (known as a Label-Switched-Path, or LSP), the IP packets remain within that pathway until they egress at the remote end if there is an existing TE tunnel along that path.
&lt;br /&gt;
&lt;br /&gt;
As a result, the intermediate routers within the LSP will still respond to the traceroute with the ICMP TTL-Exceeded packets as normal, but these packets are forwarded along the full path and back before being sent back to the originating source of the traceroute.
&lt;br /&gt;
&lt;br /&gt;
In consequence, the round-trip-time that you see for the Paris-side router in this instance is actually the round-trip-time for the full MPLS path, plus the time between the source and the router itself.  Again, this is perfectly normal behavior.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: Why do you run MPLS on your network?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: MPLS allows for a number of different solutions, not least of which is providing traffic engineering and flow control based on certain criteria. We can specify certain traffic based on its characteristics to follow a given MPLS path under normal circumstances, while still allowing for alternative paths in case of link failures.
&lt;br /&gt;
&lt;br /&gt;
We can also make use of other features of MPLS to enable layer2 and layer3 VPN connectivity across different portions of the network for some of the Gandi services, whilst keeping the size of the routing tables as low as possible. (The DNS servers being deployed in anycast use some of the features provided by MPLS across the core of the network, for example).
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: I have a server in Baltimore and one in Paris. Can I have a second interface each with a private VLAN to connect the two servers with a back-end private network?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: We are working on a private VLAN solution to be deployed later in 2011 and we are looking at ways to provide private VLAN connectivity for customers between their servers in different datacenters.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;strong&gt;Q: I'm not convinced! This is a new datacenter, and I am not running any services yet, but even between my server and its next hop router I get weird and inconsistent ping results. Why?&lt;/strong&gt;&lt;/h3&gt;
&lt;br /&gt;
A: This is due to hardware buffer sizes on physical ethernet interfaces. In order to transmit data physically &amp;quot;onto the wire&amp;quot; the interface needs to fill the buffer. If there is little or no traffic, small amounts of data will be &amp;quot;stored&amp;quot; in the buffer until there is enough data to transmit. This will result in false delay/round-trip and variance/jitter readings. Under normal data usage, this phenomenon is much less evident because the buffers will fill more quickly. It is, nevertheless, completely normal behavior for any network device or server NIC.
&lt;br /&gt;
&lt;br /&gt;
We hope that these help answer some of the questions that you have expressed. We will additionally be putting this FAQ along with any new questions and answers over time on Gandi's online knowledge center (&lt;a href=&quot;http://wiki.gandi.net&quot;&gt;http://wiki.gandi.net&lt;/a&gt;), so please check back from time to time for updates!
&lt;br /&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>How to Create a System Images for Your Server</title>
    <link>http://gandikitchen.net/post/2010/11/16/How-to-Create-a-System-Images-for-Your-Server</link>
    <guid isPermaLink="false">urn:md5:17ce0bfdd5be785bcc7b36b4420898da</guid>
    <pubDate>Tue, 16 Nov 2010 16:46:00 +0100</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Hosting</category>
        <category>Hosting</category>    
    <description>&lt;p&gt;There are many reasons to create a system
image for your servers: to build a custom system with your preferred
applications pre-installed, to create an image of a game server that can be
easily deployed, to simply duplicate a custom server, or simply to backup one's
system...&lt;/p&gt;
&lt;p&gt;The procedure is relatively simple and can be performed by anybody, as long as
you pay careful attention to the detail.&lt;/p&gt;    &lt;h2&gt;Create a Data Disk&lt;/h2&gt;
&lt;p&gt;You need to create a data disk via the disk creation interface of your
hosting account.  If you wish to
make a copy of an existing disk, the data disk must be of sufficient capacity.&lt;/p&gt;
&lt;p&gt;Simply attach your new disk to the target server ; the server that contains
the virtual disk to copy, or the server used to perform the base installation.&lt;/p&gt;
&lt;h2&gt;Create a System Image&lt;/h2&gt;
&lt;h3&gt;By making a copy of the data from a virtual
disk.&lt;/h3&gt;
&lt;p&gt;Warning: You must have sufficient space on the destination disk.&lt;/p&gt;
&lt;p&gt;Copy the data from the source disk to the destination with the 'tar'
command:&lt;/p&gt;
&lt;pre&gt;tar cC /srv/disk1 . | tar xC /srv/disk2&lt;/pre&gt;
&lt;p&gt;If /srv/disk1 is the directory where the source disk is mounted and
/srv/disk2 is the mount point of the destination disk.  Using 'tar' will only copy the data and
not empty blocks, so the operation is relatively quick.&lt;/p&gt;
&lt;p&gt;Warning:  if you want to copy
the local system disk, you must add a few exclusions:&lt;/p&gt;
&lt;pre&gt;tar&lt;br /&gt;--exclude=/proc --exclude=/sys --exclude=/srv/disk2 -c \ | tar xC /srv/disk2&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;By installing a base system&lt;/h3&gt;
&lt;h4&gt;Preamble&lt;/h4&gt;
&lt;p&gt;Your new disk attached to a server is ready for use.  You can partition your disk to prepare
a swap partition for the image, but we advise that you do not create  partitions and to create the file
system directly on the disk.&lt;/p&gt;
&lt;p&gt;In this way you have the advantage of flexibility if you intend to resize
the disk later (no need to calculate the partition table), whilst being better
adapted to the block storage on our physical filers, and to be able to decide
later whether or not to use a swap file.&lt;/p&gt;
&lt;p&gt;In the near future, all of the OS images provided by Gandi will be without
partitions, and the Gandi hosting platform will automatically provide
additional swap space.&lt;/p&gt;
&lt;p&gt;Meanwhile, the virtual servers will still see the first disk as
&amp;quot;xvda1&amp;quot; and the swap disk as &amp;quot;xvda2&amp;quot;.&lt;/p&gt;
&lt;p&gt;Whether or not you decide to partition, the Gandi hosting platform will be
able to start a system disk with your image as source by detecting the disk
boot sector and adapting the kernel boot options.  Gandi also provide a server containing copies of the distributions
for which we provide system images. 
You can use this server to speed up your installation :
mirrors.gandi.net&lt;/p&gt;
&lt;h4&gt;Preparation&lt;/h4&gt;
&lt;p&gt;Initially, verify that the virtual disk is not already mounted (for example
in /proc/mounts).  Unmount the disk
if it is mounted.  Partition the
disk if required and then format it.&lt;/p&gt;
&lt;p&gt;We recommend that you format the disk directly and use the ext4 file
system.  If, for example, your disk
is xvdc :  mkfs.ext4 -j -m0
/dev/xvdc  and then mount the disk
to a directory of your system : 
mount -o rw /dev/xvdc /var/tmp&lt;/p&gt;
&lt;h4&gt;Bootstrap installation for distributions using .deb packages&lt;/h4&gt;
&lt;p&gt;The base system installation can be accomplished with debootstrap in a specific
directory.  Once the installation
is completed and a few modifications are made, the disk will contain a bootable
and fully functional GNU/Linux system. 
The system will have a basic set of applications and you will need to
adapt the system to your requirements by installing any required applications
with apt-get and  configuring the
locales.&lt;/p&gt;
&lt;p&gt;We highly recommend the installation of a system with the amd64/x86_64
architecture, as this will be faster on the Gandi platform.  When it comes to selecting the kernel,
you should choose the appropriate x86_64 kernel (2.6.32-3831, for example).&lt;/p&gt;
&lt;p&gt;An example installation for an Ubuntu Maverick 10.10 distribution on a
previously prepared and mounted disk:&lt;/p&gt;
&lt;pre&gt;debootstrap&lt;br /&gt;--arch=amd64 --verbose --components=main,universe,multiverse \&lt;/pre&gt;
&lt;pre&gt;--include=openssh-server,openssh-client&lt;br /&gt;maverick /var/tmp \&lt;/pre&gt;
&lt;pre&gt;http://mirrors.gandi.net/ubuntu/&lt;/pre&gt;
&lt;p&gt;Should debootstrap happen to complain that no configuration file for
maverick is accessible, you only need create a link in
/usr/share/debootstrap/scripts from lucid to maverick.  The following step will modify the file
containing the source package media locations.  Edit the file /etc/apt/sources.list in the directory by adding the distribution media and the Gandi
package media.&lt;/p&gt;
&lt;p&gt;Example :&lt;/p&gt;
&lt;pre&gt;# cat&lt;br /&gt;/var/tmp/etc/apt/sources.list&lt;/pre&gt;
&lt;pre&gt;deb&lt;br /&gt;http://mirrors.gandi.net/ubuntu maverick main universe multiverse&lt;/pre&gt;
&lt;pre&gt;deb&lt;br /&gt;http://mirrors.gandi.net/ubuntu maverick-security main universe multiverse&lt;/pre&gt;
&lt;pre&gt;deb&lt;br /&gt;http://mirrors.gandi.net/ubuntu maverick-updates main universe multiverse&lt;/pre&gt;
&lt;pre&gt;deb&lt;br /&gt;http://mirrors.gandi.net/gandi/ubuntu maverick main&lt;/pre&gt;
&lt;p&gt;Once the debootstrap command and the configuration has been completed, you will
be able to access the newly installed system via chroot to the directory.&lt;/p&gt;
&lt;p&gt;For example: chroot /var/tmp&lt;/p&gt;
&lt;p&gt;In this way, you can refresh the package media with apt-get update  and install the various applications
and packages that you may require. 
Beware, however, that the installation of packages in a chroot require a
few corrections.  Notably, you will
need to mount /proc and /dev/pts which are usually available in /etc/fstab :  mount
-a  then complete the package
configurations with dpkg --configure -a.  Certain packages attempt to
automatically start the daemons and servers as they are installed. You will
have to stop these services to umount your image later.&lt;/p&gt;
&lt;p&gt;In order to complete the installation of these packages, you will need to
modify the postinst files installed in /var/lib/dpkg/info by commenting out the
calls to invoke-rc.d or start, such as with procps : #start procps in procps.postinst or for rsyslog : #invoke-rc.d in rsyslog.posinst.&lt;/p&gt;
&lt;p&gt;For recent Ubuntu distributions, you will need to add an entry for /dev in
the /etc/fstab file:  dev 
/dev  tmpfs  rw  0 0  in
order to boot correctly.&lt;/p&gt;
&lt;p&gt;Next, copy the files /etc/hosts, /etc/resolv.conf and /etc/fstab of the
server to the directory containing the newly installed system (/var/tmp in our
example).  Change these by deleting
the hostname of the current machine in /etc/hosts and adapting /etc/fstab to
your new disk image.&lt;/p&gt;
&lt;p&gt;We recommend installing the gandi-hosting-agent and gandi-hosting-vm
packages available on the Gandi distribution media server.  To do so, add the Gandi maintainer key
as follows:&lt;/p&gt;
&lt;pre&gt;&lt;p&gt;apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D8EAC2F4DAFE3FA5&lt;/p&gt;
&lt;/pre&gt;
&lt;p&gt;then :&lt;/p&gt;
&lt;pre&gt;&lt;p&gt;apt-get install gandi-hosting-agent gandi-hosting-vm&lt;/p&gt;
&lt;/pre&gt;
&lt;h6&gt; &lt;/h6&gt;
&lt;p&gt;The packages will install their required dependencies.  For a description of the functions of
these packages, please refer to the previous article in the Gandi Kitchen.&lt;/p&gt;
&lt;p&gt;If your virtual server uses python version 2.6, you will need to install
the package gandi-hosting-agent-py2.6
instead of gandi-hosting-agent.&lt;/p&gt;
&lt;h4&gt;Basic Installation for Distributions using .rpm&lt;/h4&gt;
&lt;p&gt;The installation of a distribution based on .rpm packages follows the same
method as for a .deb based distribution, but using rinse or a specific application for the chosen distribution.&lt;/p&gt;
&lt;p&gt;For example, using the same directory :&lt;/p&gt;
&lt;pre&gt;&lt;p&gt;rinse --arch=amd64 --directory=/var/tmp --distribution=centos-5&lt;/p&gt;
&lt;/pre&gt;
&lt;h6&gt; &lt;/h6&gt;
&lt;p&gt;According to your package management system, you will need to then add the
package media locations in the configuration in order to install the necessary
applications.&lt;/p&gt;
&lt;p&gt;Please refer to the debootstrap / .deb base system installation for the
remaining step : Gandi specific package installation, copy of system
configuration file.&lt;/p&gt;
&lt;h4&gt;Other Ways to Install a Base System&lt;/h4&gt;
&lt;p&gt;Other distributions (often more specific) have other methods of installing
the base system.  Sometimes an
image is already available, thus you need only mount it in 'loop' and copy the
files from the image.&lt;/p&gt;
&lt;p&gt;Taking the above example :&lt;/p&gt;
&lt;pre&gt;mkdir /srv/a&lt;/pre&gt;
&lt;pre&gt;mount -o loop,ro /my/image/directory /srv/a&lt;/pre&gt;
&lt;pre&gt;cp -raf /srv/a/ /var/tmp/&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Yet a More Radical Method&lt;/h4&gt;
&lt;p&gt;If you have a source disk to copy, you could also copy the entire
disk;  Ensure that the destination
disk that was just attached to the server is not mounted, and verify that the disk
nameis not present in /proc/mounts.&lt;/p&gt;
&lt;p&gt;Warning : this method only works where the destination disk is the same
size as the source.&lt;/p&gt;
&lt;p&gt;To create your system image and copy it to your new data disk, you will use
the 'dd' command.  You need to pay
close attention to the syntax of the command.&lt;/p&gt;
&lt;p&gt;Here is an example, which will be explained afterwards:&lt;/p&gt;
&lt;h6&gt; &lt;/h6&gt;
&lt;pre&gt;&lt;p&gt;dd if=/dev/xvda of=/dev/xvdc conv=sync&lt;/p&gt;
&lt;/pre&gt;
&lt;p&gt;The parameter if= refers to the source disk; of= refers to, of course, the
destination disk.  Any data on the
destination disk will be completed erased.  In order to distinguish between the disks, we recommend
first using the 'df' command.&lt;/p&gt;
&lt;p&gt;Note that the image will not be bootable.  You will need to reconfigure the network settings of your
server using DHCP before proceeding with the creation of the image.  Copying using 'dd' takes significant
time and resources as it copies byte-per-byte the source disk to the
destination, without any distinction between a data block and an empty
block.  The Linux kernel for the
Gandi hosting platform boots by default on the first partition (
root=/dev/xvda1 on the boot command line).  If you copy an existing system disk, the partition table
will be correct on the destination. 
Otherwise, you should ensure that the first partition of the destination
disk contains the system files and is flagged as bootable.  You can also additionally create a swap
partition.&lt;/p&gt;
&lt;h4&gt;Requirements to Boot&lt;/h4&gt;
&lt;p&gt;In the case of a copy of an existing virtual disk, the source disk having
already booted, you only need to check that the network configuration is using
DHCP so that the produced images will be correctly bootable.  In the case of an image created by a
base system installation, there are a few items to verify and/or modify:&lt;/p&gt;
&lt;p&gt;All of the services or modules related to physical elements of the server
must be deactivated (such as, the service associated with the system clock -
hwclock)&lt;/p&gt;
&lt;p&gt;Some services at boot-time, such as ureadahead, console-setup, ondemand,
plymouth, must be deactivated. 
Move away the init-scripts associated with these services.  In an Ubuntu distribution, these
scripts are found in /etc/init.
&lt;/p&gt;
&lt;p&gt;Add the gandi-hosting-agent and gandi-hosting-vm packages.  The agent allows the installation of
your server to complete.  The
scripts contained in the gandi-hosting-vm package allow the hosting platform to
automatically and dynamically manage the server resources.  For a system with python 2.6, you
should install gandi-hosting-agent-py2.6 instead. For more details on these
packages, please read the  previous
post on the Gandi Kitchen.&lt;/p&gt;
&lt;p&gt;Delete the files related to ssh keys generated during the installation of
the sshd package to avoid having the same key present on all of the servers
generated from the same source image.&lt;/p&gt;
&lt;p&gt;Verify that xinetd/inetd is started at boot -- if not, then activate
it.  The Gandi-agent is spawed via
xinetd/inetd and will enable the final configuration of your server.  The package gandi-hosting-agent
installs its configuration file in /etc/gandi/agent.yml.&lt;/p&gt;
&lt;p&gt;Verify that the permissions of 
your installation directory structure and the directories lib/ root/ and
tmp/ of the installation directory. 
If in doubt, apply the same permissions to these directories as your
existing server outside of the chroot.&lt;/p&gt;
&lt;pre&gt;chmod 0755 /var/tmp/lib&lt;/pre&gt;
&lt;pre&gt;chmod 1777 /var/tmp/tmp&lt;/pre&gt;
&lt;pre&gt;chmod 0750 /var/tmp/root&lt;/pre&gt;
&lt;pre&gt;chmod 0755 /var/tmp/&lt;/pre&gt;
&lt;p&gt;Create the base files in /dev of your installation for the first boot
stages, for example:&lt;/p&gt;
&lt;pre&gt;[ -e &amp;quot;$chroot&amp;quot;/dev/xvc0 ] || mknod &amp;quot;$chroot&amp;quot;/dev/xvc0 c 204 191&lt;/pre&gt;
&lt;pre&gt;[ -e &amp;quot;$chroot&amp;quot;/dev/console ] || mknod &amp;quot;$chroot&amp;quot;/dev/console c 5 1&lt;/pre&gt;
&lt;pre&gt;[ -e &amp;quot;$chroot&amp;quot;/dev/null ] || mknod &amp;quot;$chroot&amp;quot;/dev/null c 1 3&lt;/pre&gt;
&lt;pre&gt;[ -e &amp;quot;$chroot&amp;quot;/dev/ptmx ] || mknod &amp;quot;$chroot&amp;quot;/dev/ptmx c 5 2&lt;/pre&gt;
&lt;pre&gt;[ -e &amp;quot;$chroot&amp;quot;/dev/zero ] || mknod &amp;quot;$chroot&amp;quot;/dev/zero c 1 5&lt;/pre&gt;
&lt;p&gt;Add the necessary kernel modules corresponding to the kernel version in
/lib/modules of your installation directory.  The modules are available on mirrors.gandi.net/kernel/  (See the associated article on the
wiki)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;At the end of the configuration, if you are inside the chroot, leave it
using 'exit' then unmount the various elements of your images in
/proc/mounts.  Kill any processes
and daemons that may have been started during package installation within the
chroot/directory.  For example
:  grep /var/tmp/proc/mounts and then umount /var/tmp/proc and any others that may be listed.  End by umount /var/tmp which should work without errors.&lt;/p&gt;
&lt;h4&gt;Detach the Disk&lt;/h4&gt;
&lt;p&gt;Return to your disk management interface in your Gandi hosting account, and
detach the disk to which you have just copied, or on which you have just
prepared the installation.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Make the disk bootable by associating a
kernel&lt;/h4&gt;
&lt;p&gt;In the administration interface, you have the posibility to define a kernel
for a disk.  Select the virtual disk
and associate it with a kernel suitable for the image you have just created.
Let's take a &amp;quot;data&amp;quot; disk as an example, that we want to transform
into a bootable virtual disk:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://gandikitchen.net/public/kitchen-en/bootable-image/s1disk_en.png&quot; alt=&quot;&quot; title=&quot;s1disk_en.png, nov 2010&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Use the link to change the disk
information, and at the bottom of the page you will find an option to change
the disk type:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://gandikitchen.net/public/kitchen-en/bootable-image/s2disk_en.png&quot; alt=&quot;&quot; title=&quot;s2disk_en.png, nov 2010&quot; /&gt; &lt;/p&gt;
&lt;p&gt;You have now
three advanced options, as for a bootable virtual disk:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://gandikitchen.net/public/kitchen-en/bootable-image/s3disk_en.png&quot; alt=&quot;&quot; title=&quot;s3disk_en.png, nov 2010&quot; /&gt;&lt;/p&gt;
&lt;p&gt;By associating a kernel, the disk becomes
usable as a custom image and will be shown in the list of images, just like the
Gandi AI or expert images provided by Gandi during the creation of a new
service via the administration interface.&lt;/p&gt;
&lt;h6&gt; &lt;/h6&gt;
&lt;h4&gt;Create a server from this image&lt;/h4&gt;
&lt;p&gt;During the creation of a server via your administration interface on the
website, you will find your new custom image in the list of available
images.  The server creation will
thus use this image as the source for the system disk.  The server will then normally boot from
a disk which is a copy of your image. 
As such, you have the possibility of creating serveral identical service
from the same custom image.&lt;/p&gt;
&lt;h4&gt; Troubleshooting the server during boot&lt;/h4&gt;
&lt;p&gt;The Gandi hosting platform gives you the ability to access the command line
of your server via the emergency console, which is accessible via an ssh
session, and provides access to the console commandline of your server.&lt;/p&gt;
&lt;p&gt;If you configure a getty on the console by default (tty1, xvc0, hvc0,
depending on the chosen kernel version), you will have an emergency shell in
case of boot errors, or a login prompt in the case of a successful server boot.&lt;/p&gt;
&lt;p&gt;This emergency console will allow you to view the boot messages, and more
importantly, any errors that may occur and thereby allowing you to debug your
image.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h4&gt;Correcting the Image&lt;/h4&gt;
&lt;p&gt;Later, if you notice errors, or have forgotten anything in your custom
image, you only need re-attach your new disk image to one of your servers
(ultimately, and preferably, a server which was created from the same source
image).  Then you only need make
the changes on the source image and then detach the disk.  The image will thus be available to
create new servers without error.&lt;/p&gt;
&lt;h6&gt; &lt;/h6&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Gandi modification on standard OS</title>
    <link>http://gandikitchen.net/post/2010/10/27/Gandi-modification-on-standard-OS</link>
    <guid isPermaLink="false">urn:md5:13358fff7bec2f91c2e38fb063d0e792</guid>
    <pubDate>Wed, 27 Oct 2010 18:03:00 +0200</pubDate>
    <dc:creator>aegiap</dc:creator>
        <category>Hosting</category>
            
    <description>    &lt;p&gt;What are the modification that Gandi staff makes on standard installed OS to be used on Gandi hosting?&lt;/p&gt;


&lt;h2&gt;Local modifications&lt;/h2&gt;


&lt;p&gt;Gandi hosting infrastructure is using Xen virtualization in paravirtualization mode (for the moment). As such we have to build a Linux kernel with specific options to allow it to boot your virtual server. Moreover as we allow customers to dynamically add or remove resources, the hotplug system in the kernel was patched by our team to allow a correct use of this features (mainly correct udev call). All kernel modules are available at each new kernel release on &lt;a href=&quot;http://mirrors.gandi.net/kernel/&quot; hreflang=&quot;en&quot;&gt;http://mirrors.gandi.net/kernel/&lt;/a&gt;. As of the 2.6.32, we now use upstream kernel source for building the xenU kernel and you should find the buildconfig file in &lt;em&gt;&lt;code&gt;/proc/config.gz&lt;/code&gt;&lt;/em&gt; on your virtual server. We add external patches such as drbd (before upstream integration).&lt;/p&gt;


&lt;p&gt;Each Linux base system that we provide on Gandi hosting contains modifications by our team. For example, we removed services based on hardware clock as Xen does not provide direct access to it. On some distribution we had to disable boot features such as &lt;em&gt;ureadhead&lt;/em&gt; or &lt;em&gt;plymouth&lt;/em&gt; to allow a flawless boot of the virtual server. The main configuration is done during the boot process, especially the first boot process.&lt;/p&gt;


&lt;p&gt;On a side note, on x86_32 architecture, to use the hardware capability of Xen, the libc could use the nosegneg hwcap with the correct libc-xen package.&lt;/p&gt;


&lt;h2&gt;Package gandi-hosting-vm&lt;/h2&gt;


&lt;p&gt;The idea which triggered this article was the release of a new version of gandi-hosting-vm. The package contains a collection of scripts to setup the local system of your virtual server at each boot and when specific events about hosting resources happen.&lt;/p&gt;


&lt;h3&gt;Changing hosting resources&lt;/h3&gt;


&lt;p&gt;When you add or remove resources dynamically to your virtual server, the Linux kernel receives information from Xen - the system managing all the virtualization. Each of these events are passed to the &lt;em&gt;udevd&lt;/em&gt; daemon which apply configured rules to these events. It mainly creates files in directory &lt;em&gt;&lt;code&gt;/dev&lt;/code&gt;&lt;/em&gt; to allow access to the newly discovered resources.&lt;/p&gt;


&lt;p&gt;For resources that Gandi hosting allows you to dynamically change, we wrote some udev rules (located in &lt;em&gt;&lt;code&gt;/etc/udev/rules.d/86-gandi.rules&lt;/code&gt;&lt;/em&gt;) to start a script when a virtual disk, a virtual interface or even a virtual cpu is attached (or removed) to the virtual server.&lt;/p&gt;


&lt;p&gt;On a more detailed level, when a virtual interface is attached, the script &lt;em&gt;&lt;code&gt;/etc/gandi/manage_iface.sh&lt;/code&gt;&lt;/em&gt; is called by udev and a DHCP request is sent for this interface. A couple of other scripts setup the default route (&lt;em&gt;&lt;code&gt;/etc/gandi/dhcp-postconf&lt;/code&gt;&lt;/em&gt;) and store network configuration (&lt;em&gt;&lt;code&gt;/etc/dchp-hostname&lt;/code&gt;&lt;/em&gt;) in a tmpfs directory for further configuration at the end of the boot process. When the virtual interface is removed, the script simply removes the local network interface.&lt;/p&gt;


&lt;p&gt;When a virtual disk is attached a similar script (&lt;em&gt;&lt;code&gt;/etc/gandi/manage_data_disk.py&lt;/code&gt;&lt;/em&gt;) is called. It tries to check the file system on the device or in its partitions (only in &lt;strong&gt;GandiAI&lt;/strong&gt; mode) and mounts the file system in a specific mountpoint using the file system label &lt;em&gt;&lt;code&gt;/srv/&amp;lt;FS label&amp;gt;&lt;/code&gt;&lt;/em&gt;. If no label is setup on the file system, it uses the device or partition name as mount point (&lt;em&gt;&lt;code&gt;/srv/xvdc1&lt;/code&gt;&lt;/em&gt; for example). To change the default mount options, please edit the variable &lt;em&gt;mount_options&lt;/em&gt; in the beginning of the Python script.&lt;/p&gt;


&lt;h3&gt;During the boot process&lt;/h3&gt;


&lt;p&gt;The &lt;em&gt;gandi-hosting-vm&lt;/em&gt; package provide two services called on boot : &lt;em&gt;gandi-mount&lt;/em&gt; and &lt;em&gt;gandi-config&lt;/em&gt;. The first one mounts already attached virtual disks in the local system in the &lt;em&gt;&lt;code&gt;/srv&lt;/code&gt;&lt;/em&gt; directory (see the description of &lt;em&gt;&lt;code&gt;/etc/gandi/manage_data_disk.py&lt;/code&gt;&lt;/em&gt;). You can start the service again once your server is booted and it will mount attached disks to the server (if you remove udev packages for example).&lt;/p&gt;


&lt;p&gt;The second service starts a couple of specific plugins to setup your local system. Some of these configurations are optional and a configuration file is available for you to choose to setup each of these optional features &lt;em&gt;&lt;code&gt;/etc/default/gandi&lt;/code&gt;&lt;/em&gt;. Each configuration variable contains a short description in the default config file. These plugins are configuring the default local console for the hosting emergency console, configure the hostname and dns resolver, change the timezone to Europe/Paris, change the hwcap nosegneg according of your kernel version, change the motd to the default and so on.&lt;/p&gt;


&lt;p&gt;For example, when the plugin &lt;em&gt;11-config_ssh&lt;/em&gt; is called, it creates SSH key for the local system if the keys are not already present. Then, depending on your configuration, it could add the Gandi SSH management key to the &lt;em&gt;root&lt;/em&gt; user keyring (variable &lt;code&gt;CONFIG_SSHMGMT&lt;/code&gt;) and reconfigure your sshd server by disabling password access for root, disabling empty password and enabling compression (variable &lt;code&gt;CONFIG_SSHD&lt;/code&gt;).&lt;/p&gt;


&lt;h2&gt;Package gandi-hosting-agent&lt;/h2&gt;


&lt;p&gt;Gandi agent is used to setup the virtual machine according to customer information. In case of &lt;strong&gt;expert&lt;/strong&gt; mode server, the setup of the local system is limited to setting the root password and creating the &lt;em&gt;administrator&lt;/em&gt; user (as chosen by the customer) to avoid ssh-ing the server as &lt;em&gt;root&lt;/em&gt;. In case of a &lt;strong&gt;GandiAI&lt;/strong&gt; mode server, the agent uses specific modules to setup applications on the local system.&lt;/p&gt;


&lt;p&gt;Once your &lt;strong&gt;expert&lt;/strong&gt; server is setup  after creation, you can remove gandi-hosting-agent packages. For example : &lt;em&gt;&lt;code&gt;dpkg -P $(dpkg -l | awk '/gandi-hosting-agent/ { print $2 }' | xargs)&lt;/code&gt;&lt;/em&gt; in deb based package system or &lt;em&gt;&lt;code&gt;rpm -e gandi-hosting-agent&lt;/code&gt;&lt;/em&gt; in rpm backed package system.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Hosting Public API 1.0 beta</title>
    <link>http://gandikitchen.net/post/2010/10/20/Hosting-Public-API-10-beta</link>
    <guid isPermaLink="false">urn:md5:074c3dd9b98ccd6967a4ec0d049ccbb5</guid>
    <pubDate>Wed, 20 Oct 2010 12:56:00 +0200</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Hosting</category>
            
    <description>&lt;p&gt;As you are probably already aware, we have been beavering away to offer you a public API to manage your resources on our Cloud hosting platform.  In order to ease the work, several things have been reorganised so as to provide an interface which is easy to use, and allow a real management of your hosting resources at Gandi.&lt;/p&gt;
&lt;p&gt;By way of this introduction, this article will be deliberately less technical, and will only succinctly present the elements that will be developed more in-depth when the official release of the API is launched.&lt;/p&gt;    &lt;h3 style=&quot;font-weight: bold;&quot;&gt;API ?&lt;/h3&gt;
&lt;p&gt;For most human beings, the term API doesn't really mean a whole lot.  Therefore, I suggest that we begin with a quick explanation of what an API is.&lt;/p&gt;
&lt;p&gt;An Application Programming Interface (API) is an interface provided by a program or system.  This interface allows other programs to use a standard machine to machine interface which in turn opens the possibility to create an appropriate human to machine interface.  From the technical perspective, an API is a collection of functions, procedures, or classes exposed by a software library, operating system, or service.  Knowledge of these APIs is paramount to the interoperability of various different software.&lt;/p&gt;
&lt;p&gt;You can see the &lt;a hreflang=&quot;en&quot; href=&quot;http://en.wikipedia.org/wiki/Application_programming_interface&quot;&gt;complete definition here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Concretely, the Hosting API allows a user to manipulate and manage his various Gandi Hosting resources.  For example, he may create new virtual machines, new disks, release IP addresses, etc.&lt;/p&gt;
&lt;p&gt;Our API has been designed to be as simple as possible to use.&lt;/p&gt;
&lt;h3 style=&quot;font-weight: bold;&quot;&gt;Use of the API&lt;/h3&gt;
&lt;p&gt;The API will allow you to manipulate all of your hosting &amp;quot;objects&amp;quot;, from entire virtual machines, to components such as disks, network interfaces, IP addresses, etc., all in a logical and programmatic fashion.  You will be able to create, delete, modify, and list the various objects.&lt;/p&gt;
&lt;p&gt;One of the main objectives, however, is that it used by other software or programs in order to create something directly associated with us.&lt;/p&gt;
&lt;p&gt;Let's look at two small examples:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;One useful for everyone, thanks to the &amp;quot;vm.update&amp;quot; method, if you happen to detect in your log files that your server is in need of more memory, you could automatically add this memory to the virtual machine &amp;quot;on the fly&amp;quot;.&lt;/li&gt;
&lt;li&gt;An example for a company that produces software, thanks to &amp;quot;vm.create&amp;quot;, you could potentially automatically deploy a server quickly from a disk that has previously been prepared with your application, and offer it directly to your customers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first set of methods will allow manipulation of the following objects:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;datacenter&lt;/strong&gt; - list , info&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;image&lt;/strong&gt; - list, info&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;vm&lt;/strong&gt; - list, info, count, create, update, start, stop, reboot, disk_attach, disk_detach, iface_attach, iface_detach&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;disk&lt;/strong&gt; - list, info, count, create, create_from, update, delete&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;iface&lt;/strong&gt; - list, info, count, create, delete&lt;/p&gt;
&lt;p&gt;As well as management of operations:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;operation&lt;/strong&gt; - list, info, count, delete&lt;/p&gt;
&lt;h3 style=&quot;font-weight: bold;&quot;&gt;New Features to Come&lt;/h3&gt;
&lt;p&gt;Taking advantage of the release of the API, several new features will also see the light of day.  These are features for which you have been asking, for the most part, and which initially will be managed by our support team.  Certain functions have been revised and move to areas where they would allow us to offer something new.&lt;/p&gt;
&lt;p&gt;The choice of kernel and command-line options, for example, is now made on each disk.  The disks, as a result, now have a more important role to play.  It will also be possible to detach a former &amp;quot;system&amp;quot; disk, and to re-attach it to another virtual machine in order to, for example, recover the system following an unsuccessful upgrade.  You could also choose from which disk a given virtual machine will boot.&lt;/p&gt;
&lt;h3 style=&quot;font-weight: bold;&quot;&gt;How Do I Take Part?&lt;/h3&gt;
&lt;p&gt;The private beta phase has already begun.  Simply send an email to beta-hosting AT gandi.net with your user ID (handle) and we will contact you with the details to allow access to the API.&lt;/p&gt;
&lt;h3 style=&quot;font-weight: bold;&quot;&gt;Test Our Solution!&lt;/h3&gt;
&lt;p&gt;All European business customers at Gandi (and, initially, those subscribed to our newsletter) will find a coupon in their account allowing a free test-drive of our solution for a month.  For everyone else, a &lt;a hreflang=&quot;en&quot; href=&quot;https://www.gandi.net/hosting/trial/&quot;&gt;request form for test shares&lt;/a&gt; is also available.&lt;/p&gt;
&lt;p&gt;Be on the lookout though, as more information and updates will be made available in the coming weeks!&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Kernel and cmdline</title>
    <link>http://gandikitchen.net/post/2010/06/03/Kernel-and-cmdline</link>
    <guid isPermaLink="false">urn:md5:a3c801954150fd2ff74e3a83587a28e4</guid>
    <pubDate>Thu, 03 Jun 2010 11:00:00 +0200</pubDate>
    <dc:creator>Ryan</dc:creator>
        <category>Hosting</category>
            
    <description>    We are pleased to announce that you can (finally!) choose the version of your kernel that you want (from a list which will be continually expanded), and associated boot options (cmdline). 2.6.18 and 2.6.27 are &amp;quot;base&amp;quot; versions supplied by Xen (backport of Xen patches for 2.6.27). Version 2.6.32, which is is currently available, uses paravirt_ops and the &amp;quot;Linux&amp;quot; implementation of Xen patches.
&lt;br /&gt;
&lt;br /&gt;

We will show you the new kernels here. They can be found in the &amp;quot;advanced mode&amp;quot; within the server's management page:
&lt;br /&gt; &lt;br /&gt;
&lt;img src=&quot;http://gandikitchen.net/public/kitchen-en/server-info-en.jpeg&quot; alt=&quot;server-info-en.jpeg&quot; style=&quot;margin: 0 auto; display: block;&quot; title=&quot;server-info-en.jpeg, Jun 2010&quot; /&gt;
 &lt;br /&gt;
&lt;br /&gt;
And you will then be able to access:
 &lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://gandikitchen.net/public/kitchen-en/.advanced-mode-en_m.jpg&quot; alt=&quot;advanced-mode-en.jpeg&quot; style=&quot;margin: 0 auto; display: block;&quot; title=&quot;advanced-mode-en.jpeg, Jun 2010&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;

Concerning cmdline, you may now deactivate selinux at boot, boot as a single user, change the disk and the boot partition (which is practical for working with &amp;quot;images&amp;quot;), or choose the most appropriate console for your needs. In short, everything that you need to manage your updates in a more friendly environment, or to repair your server in the most autonomous manner.
 &lt;br /&gt;
&lt;br /&gt;

If you feel that an option is missing, please let us know.</description>
    
    
    
      </item>
    
  <item>
    <title>Mandriva 2010 image in alpha (updated)</title>
    <link>http://gandikitchen.net/post/2010/05/21/Mandriva-2010-image-in-alpha</link>
    <guid isPermaLink="false">urn:md5:47d5903efdbf3db15eb2c8434d692337</guid>
    <pubDate>Fri, 21 May 2010 17:35:00 +0200</pubDate>
    <dc:creator>aegiap</dc:creator>
        <category>Hosting</category>
        <category>alpha</category><category>hosting</category><category>mandriva</category>    
    <description>    &lt;p&gt;Server hosting by Gandi allow customers to choose from a selection of OS images
available during the creation process of the virtual server. After the creation
of the image by Gandi and internal testing, a new distribution is released to
a specific group of hosting  customers called 'alpha'. These clients can create
server using these release candidate images. This allows Gandi to increase the
types of testing and usage, and to find more bugs and problems by working with a small group
of its customers.&lt;/p&gt;


&lt;p&gt;Today - May the 21th - the Mandriva 2010.0 image has been released . This new version
of the Mandriva distribution boots with a 2.6.27 kernel by default. It is currently only
available for the 'alpha' customer group but will shortly be available for all customers.
Please contact us if you wish to participate in our alpha testing phase.&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;16th August 2010 : Image is now available for everybody&lt;/strong&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Cherokee Arrives at Gandi</title>
    <link>http://gandikitchen.net/post/2010/04/29/Cherokee-Arrives-at-Gandi</link>
    <guid isPermaLink="false">urn:md5:78dbdb8d5ebcfbf2d9a05a86edbf4fb5</guid>
    <pubDate>Thu, 29 Apr 2010 13:48:00 +0200</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Hosting</category>
            
    <description>    &lt;p&gt;(Translator's note: Taskigi Sequoyah would be proud! ;) )&lt;/p&gt;
&lt;p&gt;A friend had explained to me that he had just finished installing a web server.  Having decided on a change and not to use the mammoth &lt;strong&gt;Apache&lt;/strong&gt; that everyone knows and loves, my friend seemed to have found a decent alternative.  Bearing the name Cherokee, it appeared much leaner and with greater performance than Apache.  See the benchmarks from the &lt;a href=&quot;http://www.cherokee-project.com/benchmarks.html&quot;&gt;project website&lt;/a&gt; at the end of this article. &lt;/p&gt;
&lt;p&gt;Personally, I had no knowledge of Cherokee, though I had certainly heard the name pandered around once or twice, but I never really paid it any attention at the time.  So to give it a whirl, I decided to install it locally, which to my surprise exceeded my expectations.  On a debian (or derived) distribution, installation is achieved by a simple &lt;q&gt;&lt;code&gt;apt-get install cherokee&lt;/code&gt;&lt;/q&gt; (or 'aptitude'...)&lt;/p&gt;
&lt;p&gt;The web management interface provided is clean and intuitive.  The basic idea is quite interesting;  It is possible to activate the PHP interpreter with a simple mouse click; same for activating different virtual hosts as well as other options.  There are also wizards to assist with the installation of such applications and frameworks as Django, Rails or Wordpress, etc.&lt;/p&gt;
&lt;p&gt;I thought that it would be interesting to present this project during a developers meeting at Gandi, especially for those who use GandiAI.  The presentation was well received.  After a few pow-wow, and a glance through the source code, there was nothing really unusual or risky.  This doesn't mean, of course, that there aren't any bugs in it, but at any rate clean code is a good sign!  The core is written in C with the administrator interface written in Python.&lt;/p&gt;
&lt;p&gt;Thus is the way in which Cherokee made its appearance at Gandi, and a server image was produced.  In this way you can rapidly test a server with Cherokee pre-installed.&lt;/p&gt;
&lt;p&gt;We have also added an &amp;quot;expert&amp;quot; mode distribution with Cherokee pre-installed... You need only to select this distribution during the steps to create your server.  And, just as a reminder, in case you haven't yet tried our service, you can always request a free trial using &lt;a href=&quot;http://en.gandi.net/hosting/trial/&quot;&gt;our online form&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;For further information about Cherokee, you can visit the &lt;a href=&quot;http://www.cherokee-project.com/&quot;&gt;project website&lt;/a&gt;.  Additionally, you can find a comprehensive article about Cherokee in the Gnu/Linux magazine France, written [in French] by Carl Chenet in &lt;a href=&quot;http://ed-diamond.com/produit.php?ref=lmag125&amp;amp;id_rubrique=1&amp;amp;caracteristique=1-2-&amp;amp;caracdisp=2-3-&quot;&gt;issue number 125&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;nb of clients / queries per seconds, avr 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/./.benchmark_m.jpg&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;benchmark-0.8, avr 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/web-servers-benchmark-20080819.jpg&quot; /&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>E-Mail 'Goes Postal' - Gandi Mail Version 2</title>
    <link>http://gandikitchen.net/post/2010/03/26/E-Mail-Goes-Postal-Gandi-Mail-Version-2</link>
    <guid isPermaLink="false">urn:md5:9967f53e7f57fb310547cf4ce7693070</guid>
    <pubDate>Fri, 26 Mar 2010 14:54:00 +0100</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Mail</category>
        <category>Mail</category>    
    <description>&lt;p&gt;Okay, excuse the corny punch line, but for those who haven't heard the expression, to &amp;quot;go postal&amp;quot; simply means to go crazy.  Without delving into the origins of the phrase, suffice it to say that the term these days can also mean to go crazy or emphatic in a positive sense as well.. (or so some would like to believe ;-) )&lt;/p&gt;
&lt;p&gt;As many may know by now, the Gandi Mail platform in the past couple of years has seen a few recurring instances of performance degradation every couple of months.  As mentioned on the Gandi Bar, our teams have been working to bring you a new and more robust mail platform.  This new platform is the culmination of a considerable amount of resource investment over many months.&lt;/p&gt;
&lt;p&gt;I am pleased to say that the new platform is fully operational and all Gandi Mail customers are fully migrated to the new system, with the migration itself taking about six weeks or so.  We decided to stage the migration gradually over a number of weeks to minimise any impact to our customers, and for the most part (with a very small handful of exceptions), the bulk of the migration was completed without anyone even noticing ;)&lt;/p&gt;
&lt;p&gt;Anyway, without further ado, let's take a brief tour of the new mail platform and what has changed in Gandi Mail version 2.  Oh.. and before we go on, this article will be at times a little bit technical with the use of some acronyms and other geek-speak.  Don't worry, you'll soon get the gist of what we bearded technophiles blabber on about on a daily basis!  ;)&lt;/p&gt;    &lt;h2&gt;In the Beginning, There Was the Word...&lt;/h2&gt;
&lt;p&gt;... and the word was written.. and ever since the dawn of the internet, the written word has become a critical part of our lives... yes.. that's right... e-mail.  So, as a domain registrar, Gandi provides email services for use with the domains registered with us.  So far so good... &lt;/p&gt;
&lt;p&gt;The original platform was designed to be horizontally scalable to support several tens or even hundreds of thousands of mailboxes.  One of the challenges faced was an architecture that had scalable storage capability whilst at the same time allowing the user to access his or her mailbox irrespective of which storage system or access server he or she connected to.  Sounds like a job for the good old Network File System (NFS).  As a result, the original platform was based on an NFS storage infrastructure for the mailboxes.  &lt;/p&gt;
&lt;p&gt;Incoming mail was received on any one of a number of inbound spool servers running Postfix.  Once the mail was received and passed through a number of anti-spam and other filters, the spool would then identify which storage filer contained the mailbox in question, and forward the mail using SMTP to the back-end storage server (itself also running Postfix) for local delivery.&lt;/p&gt;
&lt;p&gt;When the user wanted to access his or her mailbox, he would access a front-end server running Dovecot.  The access servers would have &amp;quot;local&amp;quot; access to all of the mailboxes through the use of NFS mounts.  The user would simply use a POP or IMAP client to connect to the server, to access his or her mailbox.&lt;/p&gt;
&lt;p&gt;Outgoing mail is quite simple; basically an SMTP relay using SASL authentication.&lt;/p&gt;
&lt;p&gt;The following diagram shows a very high level overview of the original version of the mail platform.&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;Gandi Mail Version 1, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/.gm-v1_m.jpg&quot; /&gt;&lt;/p&gt;
&lt;h2&gt;So What Has Changed?&lt;/h2&gt;
&lt;p&gt;Okay - before we get to the &amp;quot;what&amp;quot; has changed - let's first look at &amp;quot;why&amp;quot; we had to change it.  &lt;/p&gt;
&lt;p&gt;The original platform was great and the architecture works very well for moderate traffic levels, irrespective of the number of mailboxes.  The risk with scaling a platform based on the number of mailboxes is that it is easy to overlook, or in some cases, misinterpret the knock-on effects of that increased scale.  As the amount of traffic began to increase over the years, from time to time the front-end access servers would start having to contend for access to the NFS filesystems, which uses a system of locks to avoid corruption that may occur when there are multiple read/write operations on the same file or block.  &lt;/p&gt;
&lt;p&gt;This diagram outlines the average volumes for the past year.  (note that the graph is not &amp;quot;stacked&amp;quot;, so the elements are cumulative.)  The vertical axis is &amp;quot;messages per minute&amp;quot;, while the horizontal axis is by month.&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;Avg Msgs per Minute - year, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/.volume-msg-per-min-year_m.jpg&quot; /&gt;&lt;/p&gt;
&lt;p&gt;As these locks increased over time (and remember that all of the servers had access across all of the filesystems), the result was a snowball effect that caused severe performance degradation of the whole platform -- and not only for the mailboxes on the storage server with the lock in place.  During this time, users would attempt to connect to their mailboxes at which time the server would accept the connection and simply wait for the lock to free in order to access the mailbox.&lt;/p&gt;
&lt;p&gt;So the challenges were simple:  &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;How to eliminate the need for NFS and still allow horizontal scalability.&lt;/li&gt;
&lt;li&gt;How to avoid impacting the entire mail platform in case of a difficulty on just one storage server, and how to minimise the impact to customers in this case.&lt;/li&gt;
&lt;li&gt;How to maximise the performance of the platform to allow vertical scalability as well as horizontal.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since there is very little change on the incoming SMTP spool elements, and the majority of the load was associated with NFS, let's look straight as the access elements.&lt;/p&gt;
&lt;h2&gt;Where Is My Mailbox?&lt;/h2&gt;
&lt;p&gt;Okay, so the user connects to his mailbox with his mail client (Thunderbird, Outlook Express, Mail.App, Evolution, or anything else for that matter...).  The client connection arrives on one of a number of front-end mail access servers running Dovecot.  How then, does the server know where to look to find the mailbox?  Originally, the mailbox was &amp;quot;local&amp;quot; because it was mounted via NFS.  Dovecot made a simple database lookup to determine the filesystem path that the mailbox was mounted under.  With the new system, there is no NFS, so there is no &amp;quot;local&amp;quot; filesystem for Dovecot to look under.&lt;/p&gt;
&lt;p&gt;This is where a very useful feature of Dovecot come into play -- the proxy function.  Using this, the front end server performs the authentication of the user, checks which storage server the mailbox is located on, and then initiates a proxy &amp;quot;client&amp;quot; connection directly to the storage server which itself is running Dovecot.  If the client connects using IMAP, then the proxy connection is also IMAP.  Similarly if the client is using POP3, then the proxy is also POP3.  The storage server does not need to re-authenticate the connection.&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;Gandi Mail Version 2 - Access, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/.gm-v2-access_m.jpg&quot; /&gt;&lt;/p&gt;
&lt;p&gt;There are a few benefits of this architecture:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Elimination of NFS also eliminates the side-effect of NFS locks.&lt;/li&gt;
&lt;li&gt;Since the back-end storage server actually has the mailbox physically locally attached, there is no contention on the filesystem, and no need for locks.  Plus, since the storage arrays are high performance anyway, access to the mailbox is much faster.&lt;/li&gt;
&lt;li&gt;The front-end servers no longer have to perform local disk I/O operations, and thus consume considerably less CPU.  (In fact, technically, there is no real reason for the front-end servers to even have disks of their own -- this could enable lower cost horizontal access scaling by being able to use diskless servers...)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What Happens if a Filer Breaks?&lt;/h2&gt;
&lt;br /&gt;To respond to the other part of the challenge, and to limit the impact in case of component failure to as few customers as possible, the original concept of scaling storage to hold as many mailboxes as possible had to be discarded.  After all, if a filer happened to fall over, all the mailboxes on that filer would also be offline.  &lt;br /&gt;&lt;br /&gt;So the idea here is to increase the number of storage servers, and spread the mailboxes more thinly across them.  In this way, in case of a failure of the storage server, fewer mailboxes are affected.&lt;br /&gt;&lt;br /&gt;The second aspect to minimising the impact of a component failure is fairly simple as well.  With the previous version of the platform (yes, remember the NFS locks?), a client connection to a mailbox would be answered by the access server and simply wait for the filesystem access.  The effect for the user is that his client would just &amp;quot;sit there&amp;quot; and eventually time out.&lt;br /&gt;&lt;br /&gt;Using the IMAP/POP3 proxy arrangement, if the actual storage server is down, the front-end server will reply immediately to the mail client with a &amp;quot;Temporarily Unavailable&amp;quot; message, and the TCP connection is closed.&lt;br /&gt;&lt;br /&gt;The disks arrays themselves are, of course, redundant.  The only real potential single point of failure is the server that controls the disk arrays since due to technical limitations of the disk arrays, it is not possible to have dual controllers if using split and mirrored RAID volumes across two disk arrays.  It would have been possible if the volumes weren't mirrored across arrays, but this would have been more risky as there would be no &amp;quot;backup&amp;quot; copy of the data volume in case of an array failure... we thus considered that the single controller server is an acceptable risk provided a spare is available and can be easily swapped in.  The following image depicts the mail storage solution.&lt;br /&gt;&lt;br /&gt;&lt;img title=&quot;Mail Filer, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/.filer_m.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;But.. I Didn't Notice the Migration&lt;/h2&gt;
If you are in this category, then all I can say is &amp;quot;super!&amp;quot; -- that's what we intended.  Though, we did have one or two hiccups along the way, and a very small minority of customers noticed, at no point was data lost, jeopardised, or otherwise endangered :)&lt;br /&gt;&lt;br /&gt;So, how did we do the migration?  Well, over a course of a number of weeks, and mostly during off-peak times, our admins worked on one filer at a time, migrating all customer mailboxes to the new filer structure using rsync... several iterations of it, in fact.  At the last iteration to fully synchronise, the database was immediately updated to reflect the new filer as the storage location of the mailbox.  All new deliveries, access requests, etc., were then made to the new filer.&lt;br /&gt;&lt;br /&gt;This process went on filer by filer over the course of a number of weeks.  An interesting side-effect of this migration and the gradual removal of NFS from the architecture is the gradual reduction of average CPU load of the access servers over the migration period, as can be seen in the graphs below.  Of course now the CPU load is pretty much negligible since NFS has been eliminated.  The two graphs are relative scale based on the average of the time period.  The first graph is the past six months, while the second graph is the average over the past five weeks.&lt;br /&gt;&lt;br /&gt;&lt;img title=&quot;Access Server CPU Load - six months, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/server-cpu-6month.png&quot; /&gt;&lt;br /&gt;&lt;img title=&quot;Access Server CPU Load - One Month, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/.server-cpu-month_m.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Some Interesting Figures&lt;/h2&gt;
Here are just a few interesting facts about the Gandi Mail platform.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Average &lt;strong&gt;60 million emails per day&lt;/strong&gt; via the SMTP incoming spools and outgoing relays.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;&lt;li&gt;8 outgoing SMTP relays&lt;/li&gt;
&lt;li&gt;8 incoming SMTP spools&lt;/li&gt;
&lt;li&gt;10 mail filters (anti-spam, etc.)&lt;/li&gt;
&lt;li&gt;7 front-end access servers (POP3 / IMAP)&lt;/li&gt;
&lt;li&gt;16 mailbox storage filers&lt;/li&gt;
&lt;li&gt;4 database servers (2 read plus 2 master with replication)&lt;/li&gt;
&lt;li&gt;Hardware distributed among multiple datacentres&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Just a Quick Stats Update Three Days Later&lt;/h2&gt;
&lt;br /&gt;Just wanted to add a quick update to the IO-Wait CPU load for the front-end servers now three days on.  In the following graph showing the CPU load on the front-end access servers for the past seven days, you can see the significant difference before and after the final migration ;)&lt;br /&gt;&lt;br /&gt;&lt;img title=&quot;IO-wait CPU 7 days, mar 2010&quot; style=&quot;margin: 0 auto; display: block;&quot; alt=&quot;&quot; src=&quot;http://gandikitchen.net/public/GandiMailV2/.io-wait-7day_m.jpg&quot; /&gt;&lt;br /&gt;&lt;br /&gt;I hope that this article has given a useful insight into the new Gandi Mail platform.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Gandi 10th Anniversary - The Experience</title>
    <link>http://gandikitchen.net/post/2010/03/17/Gandi-10th-Anniversary-The-Experience</link>
    <guid isPermaLink="false">urn:md5:0725b243853c7b857f2f4da85266e035</guid>
    <pubDate>Wed, 17 Mar 2010 19:33:00 +0100</pubDate>
    <dc:creator>Leland Vandervort</dc:creator>
        <category>Hosting</category>
        <category>Hosting</category>    
    <description>&lt;p&gt;To celebrate Gandi's 10th anniversary, this hair-brained idea to give away, in ten days, 55000 domains, raise a very practical question.  How, once we open the floodgates on such an operation, to maintain the highest quality of service on the site?  The festive spirit could well have transformed into a nightmare for our customers if they were suddenly unable to access their management interface.&lt;/p&gt;
&lt;p&gt;So we took the decision to host the event on a dedicated site.  This was a hitherto dreamed of occasion to put ourselves into our customers' shoes, and use our hosting infrastructure for this event.  We defined the rules of play:  Using only the tools provided to our customers, build an architecture which was easily scalable and didn't break the bank, and to demonstrate our renowned flexibility.&lt;/p&gt;    &lt;br /&gt;
&lt;h3&gt;Keep it Simple, Stupid.&lt;/h3&gt;
&lt;p&gt;We had the &amp;quot;luxury&amp;quot; of one week from design to implementation. As a result, the charming idea to demonstrate our &amp;quot;cloudlike&amp;quot; site based on modern technology was summarily put out of our minds. To be perfectly honest, given the time scale, the lucky chosen developer had a nifty precept to select the technology: &amp;quot;You have full choice of the technology, but you have one week.&amp;quot; It would be PHP/MySQL, which isn't exactly everybody's favourite! It would, nevertheless, allow us to release a tested site within the tight time frame.&lt;/p&gt;
&lt;p&gt;To adequately sustain the load generated by such an event, several servers would be needed. We then hit our first stumbling block: Gandi does not [yet] have a load balancing solution for the hosting solution! Nevermind, we'll use the old yet faithful round-robin DNS method, with a low TTL to be able to quickly remove a front-end server from production in case of an incident.&lt;/p&gt;
&lt;p&gt;Our Linux distribution for this occasion would be Ubuntu 9.10 - because it is reasonably up-to-date, with the 2.6.27 kernel.&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;Small Servers - Go Forth and Multiply!&lt;/h3&gt;
&lt;p&gt;The best way to sustain the high loads for our solution is to split the functionality among several small servers. This way we would maintain a minimum level of &amp;quot;vertical&amp;quot; scalability (you can dynamically increase the memory and CPU allocated to a server), and the architecture provides &amp;quot;horizontal&amp;quot; scalability.&lt;/p&gt;
&lt;p&gt;In this way we could easily add resources if we started to feel the pinch, and add or migrate shares from one server to another as load requirements necessitate. There are numerous advantages of using multiple small servers:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;each server gets a minimum of one core, burstable, of the CPU (yes, one whole core, even with one share -- that's new, by the way!)&lt;/li&gt;
&lt;li&gt;assured resilience, with shares spread somewhat randomly across a few hundred different physical servers.&lt;/li&gt;
&lt;li&gt;specifically in a virtualised environment, the memory performance is best with less than 1GB of memory.&lt;/li&gt;
&lt;li&gt;if you have 4 servers of one share each, rather than one big server of 4 shares, they can dynamically increase to 8x4 shares, or 24x4 shares with a reboot, and all of this without modification to the architecture. A big server, however, would only scale to 8 shares without a reboot, or 24 after reboot.&lt;/li&gt;
&lt;li&gt;resources may be easily moved towards servers that need it most&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We commence with a simple architecture:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;24 (!) servers of one share each, to manage the PHP website: 10 for the English site, 10 for the French site, and an additional 2 of each for IPv6.&lt;/li&gt;
&lt;li&gt;2 servers of 4 shares each for replicated memcached to reduce database load and manage sessions.&lt;/li&gt;
&lt;li&gt;1 MySQL server of 4 shares, which contains the pre-generated promotion codes (they actually all fit within memory, so the database itself should really be pretty bored doing nothing...)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After a couple of lovely overloads and a bit of code review, the database would finally be greatly spared by memcached (see the section &amp;quot;&lt;a href=&quot;http://gandikitchen.net/post/2010/03/17/Gandi-10th-Anniversary-The-Experience#code&quot;&gt;lightweight coding...&lt;/a&gt;&amp;quot;).&lt;/p&gt;
&lt;p&gt;One of our administrators would put his fingers to work on the site to create and configure 24 servers -- at the same time! Obviously the release of the hosting API or an admin interface function would have been welcome. (Thanks to &lt;ins&gt;cssh&lt;/ins&gt; in this case!)&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;Lock Down (somewhat) the Machines&lt;/h3&gt;
&lt;p&gt;A default installation always needs a few finishing touches. The very fact of opening a MySQL database on the &amp;quot;public&amp;quot; network made us a little edgy. So, swooping 'netstat' and shutting down non-critical services listening on public ports. With the help of tcp wrappers (hosts.allow, hosts.deny), all of the &amp;quot;private&amp;quot; interfaces are also locked down (sshd, mysql accessibly only from the web farm).&lt;/p&gt;
&lt;p&gt;Finally it behooved us to pay close attention to the PHP code and MySQL queries; The safest way to avoid php code injections is to bind all the parameters after a prepare(). This also helps reduce load on the database when several execute() are called.&lt;/p&gt;
&lt;p&gt;One important detail: since the site should allow a user to send an email to any &amp;quot;arbitrary&amp;quot; address, it was absolutely critical to limit its potential for abuse by some clever black-hat as much as possible. At the very minimum, the number of sent emails per promotion code was limited, in addition to very close monitoring.&lt;/p&gt;
&lt;br /&gt;&lt;h3&gt;Setup the Development and Deployment Environment&lt;/h3&gt;
&lt;p&gt;The sharing of data between the sites in effect adds a single point of failure, as well as a potential architectural bottleneck. As such, we decided to deploy the content of the site locally on each of the servers. We would use one server for developing and staging, and ultimately for the development and testing of updates. A quick script and some 'rsync' would allow rapid deployment across the entire front-end architecture. Simple! (some would say ;) )&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;Resource Monitoring&lt;/h3&gt;
&lt;p&gt;A few moments before the operation, more as a precaution rather than a cure, all of the virtual machines from one to two shares. Using the statistics interface, from day one, one can see that the the virtual machines were essentially sitting &amp;quot;twiddling their thumbs&amp;quot; from boredom ;) :&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;CPU on a Front-end Webserver&quot; title=&quot;CPU on a Front-end Webserver, mar 2010&quot; src=&quot;http://www.lacuisinedegandi.net/public/./.console.gandi.net.cpu_m.jpg&quot; /&gt;
&lt;img alt=&quot;Network interface on a front-end Websever&quot; title=&quot;Network interface on a front-end Webserver, mar 2010&quot; src=&quot;http://www.lebardegandi.net/public/./.console.gandi.net.vif_m.jpg&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;It would have been cool, at this very moment, to reduce back to a single share per server, or make use of Gandi &amp;quot;Autoflex&amp;quot;, or even given the actual load observed, set up scheduled flex for each hour to hand out the promotion codes! Unfortunately, with all hands on deck, we missed this opportunity to demonstrate this [econono-techno-ecological ;)] feature.&lt;/p&gt;
&lt;br /&gt;
&lt;h3 id=&quot;code&quot;&gt;Lightweight Code is Worth More than a Thousand Beefy CPUs&lt;/h3&gt;
&lt;p&gt;Even though we physically had several thousand CPUs and a few Terabytes of RAM at our fingertips, Tuesday turned out to be somewhat chaotic and worthy of note here. After Monday, which managed the load very well, the &amp;quot;smooth&amp;quot; execution of our one and only SELECT COUNT brutally altered and became excruciatingly slow (300ms). We had naively thought that this &amp;quot;only&amp;quot; query, on a table held exclusively in memory, wouldn't be an issue. As such, it was executed on every page of the site. The multiple simultaneous accesses to the database, coupled with the UPDATE operations for the promotion codes, resulted in the database, despite the near-idle system performance, started causing database lock contention.&lt;/p&gt;
&lt;p&gt;The usual knee-jerk reaction to such a situation is to increase the number of shares to support the load. It's great for a quick-fix temporary solution, but it's not enough!&lt;/p&gt;
&lt;p&gt;A new analysis of the system, questions about the code, and the use (or salvation) of memcached resulted in recovering the optimal performance. Equally, a modification of the database queries used probably would have been prudent.&lt;/p&gt;
&lt;p&gt;The moral of the story: the code, indexes, architecture (etc.) are the cornerstones of your ability to support usage load, and if they are &amp;quot;CPU friendly&amp;quot;, they will save the day. Otherwise a catastrophe could be lurking, or at the very least, the unnecessary purchase of additional shares.&lt;/p&gt;
&lt;p&gt;Also, as we said earlier somewhat tongue-in-cheek -- it's eco-friendly!&lt;/p&gt;
&lt;br /&gt;
&lt;h3&gt;Some Numbers&lt;/h3&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;36 shares total, but we could have done it with less (*sniff*)&lt;/li&gt;
&lt;li&gt;5% CPU usage at peak&lt;/li&gt;
&lt;li&gt;4000 requests per front-end web server in the first minute of each hour (roughly 1400 requests/second total)&lt;/li&gt;
&lt;li&gt;a minimum of 11 seconds to hand out 1000 promotion codes.&lt;/li&gt;
&lt;li&gt;a maximum of 40 minutes to hand out the same number of promotion codes, during the Tuesday incident described above.&lt;/li&gt;
&lt;/ul&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>What to do if your server stops responding?</title>
    <link>http://gandikitchen.net/post/2010/01/13/What-to-do-if-your-server-stops-responding</link>
    <guid isPermaLink="false">urn:md5:5b20bdf2051d86a8ff1da3f97a90b4b5</guid>
    <pubDate>Wed, 13 Jan 2010 13:26:00 +0100</pubDate>
    <dc:creator>Ryan</dc:creator>
        <category>Hosting</category>
            
    <description>As you probably already know, our platform protects you from hardware failures that might occur on your server.
&lt;br /&gt;
&lt;br /&gt;
In the event of a problem on the machine, or if we suspect that a problem might occur (abnormal temperature, corrupted memory, etc.), your “server” will automatically be migrated to another machine.
However, if you have an internal problem on your &amp;quot;server&amp;quot; that is not to due to the physical machine, and if it no longer responds, then you will need to take action.    &lt;br /&gt;
 The first action to take is to be sure that your server’s status is shown as “Running” on your Gandi interface. This is because the status may also be “Stopped” or “Paused” if, for example, it has not been renewed. So given that it is &amp;quot;Running&amp;quot; and non-responding, here's what to do.
&lt;br /&gt;
&lt;br /&gt;
&lt;ins&gt;&lt;strong&gt;There are three different cases:&lt;/strong&gt;&lt;/ins&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1. You can still connect to your server via SSH.&lt;/strong&gt; In this case, the following commands will help you analyze the situation:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;quot;&lt;strong&gt;uptime&lt;/strong&gt;&amp;quot;  will give you the current load of the machine,&lt;/li&gt;
&lt;li&gt;&amp;quot;&lt;strong&gt;free&lt;/strong&gt;&amp;quot;, will show you the amount of memory used by your applications in the “used” column,&lt;/li&gt;
&lt;li&gt;&amp;quot;&lt;strong&gt;top&lt;/strong&gt;&amp;quot; (we recommend that you install “htop&amp;quot;) will show you the ranking of applications in realtime ordered by their use of resources (memory, CPU),&lt;/li&gt;
&lt;li&gt; &amp;quot;&lt;strong&gt;dmesg&lt;/strong&gt;&amp;quot; shows you messages from your linux server’s kernel,&lt;/li&gt;
&lt;li&gt;Consulting logs such as /var/log/messages or /var/log/daemons with the command, “tail”, for example (tail /var/log/daemons) will also provide you with precious information. &lt;/li&gt;
&lt;li&gt;&amp;quot;&lt;strong&gt;df –h&lt;/strong&gt;&amp;quot; shows you the amount of disk space available on your disks.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;strong&gt;The most frequent causes of error are:&lt;/strong&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;No space left on your system disk: this situation is often caused by a lack of appropriate log management on the server, or by a database which fills up too quickly. The solution is to clean up wasted space, or enlarge the disk (see the &lt;a href=&quot;http://wiki.gandi.net/en/hosting/manage-disk/resize-disk&quot;&gt;guide&lt;/a&gt; on this).&lt;/li&gt;
&lt;li&gt;Not enough RAM on the server, or too much memory used: the simple solution is to add more RAM by adding additional shares. If you have an expert server, you can also try to modify the behavior of the Linux’s available memory by using the command 'sysctl -w vm.overcommit_memory = 2'. &lt;strong&gt;Warning:&lt;/strong&gt; so that the modification can be maintained following a reboot, you must also add &amp;quot;vm.overcommit_memory = 2&amp;quot; to the &amp;quot;/etc/sysctl.conf&amp;quot; and &amp;quot;/etc/gandi/sysctl.conf&amp;quot; files.&lt;/li&gt;
&lt;li&gt; Too may processes are running simultaneously on your machine: you will need to lower the values in the configuration files of your applications (the number of simultaneous connections on Apache, for example) or increasing the power of your server by adding shares.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;strong&gt;2. You can no longer connect to your server under SSH, and it does not respond to ping or it has a slow response time.&lt;/strong&gt;
&lt;br /&gt;
&lt;br /&gt;
The &lt;strong&gt;virtual console&lt;/strong&gt; which you may activate from your account (&lt;a href=&quot;http://wiki.gandi.net/en/hosting/using-linux/how_to_use_console&quot;&gt;guide available&lt;/a&gt;), gives you direct access to your machine as if a monitor and a keyboard (still virtual) were directly attached to the server.
&lt;br /&gt;
&lt;br /&gt;
In this case, you can stop all the applications that are causing problems, and once again get access to the server.
&lt;br /&gt;
&lt;br /&gt;

The 'sysreq' shortcuts are available from the console of your server. The commands can be given by pressing Ctrl and “o” (as Oscar) in order to enter the &lt;strong&gt;sysreq mode&lt;/strong&gt;, and then you can enter the command. By doing this, you can stop all the processes by:
&lt;strong&gt;Ctrl+o +i&lt;/strong&gt; (to kill). &lt;strong&gt;Ctrl+o +h&lt;/strong&gt; gives you quick help to all of the available sysreq commands.
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;3. Your server may be “unreachable” but may nonetheless be working normally, and without any technical problem.&lt;/strong&gt;
&lt;br /&gt;
&lt;br /&gt;
This may happen if your server is the victim of a &lt;strong&gt;DDoS attack&lt;/strong&gt; for example. Your server will therefore be &lt;strong&gt;isolated from the rest of the network&lt;/strong&gt; in order to protect our infrastructure and the quality of service for other customers.
&lt;br /&gt;
&lt;br /&gt;
You may verify whether or not your server is in this state by performing a “&lt;strong&gt;traceroute&lt;/strong&gt;” command on the IP address of your server. If it stops at its arrival at Gandi, on one of our routers for example, it is likely that your server has been isolated from the network. You may then connect to your server via the console, though you will need to contact the support team to correct the problem (they will usually contact you first). This sort of isolation happens only very rarely.
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;After that, if you are still blocked, then this means that you are in the 4th case: your very own case ;-).&lt;/strong&gt; Please send an email to our support team indicating that your server has been blocked, and you will get an answer as soon as possible.</description>
    
    
    
      </item>
    
  <item>
    <title>How to turn your website into a  &quot;Web Infrastructure&quot;</title>
    <link>http://gandikitchen.net/post/2010/01/13/How-to-turn-your-website-into-a-Web-Infrastructure</link>
    <guid isPermaLink="false">urn:md5:a14a971af01c9d955f26096e4c128eb9</guid>
    <pubDate>Wed, 13 Jan 2010 13:25:00 +0100</pubDate>
    <dc:creator>Ryan</dc:creator>
        <category>Hosting</category>
            
    <description>Many websites start with a single server solution, a box acting as a web server and database server all in one. Simply, easy, cheap. The problem comes when traffic gets too high (a victim of their own success!). Many customers want a bigger box, but the answer is actually changing your architecture from &amp;quot;web server&amp;quot; to &amp;quot;web infrastructure&amp;quot;. You can duplicate web servers, use the DNS to load balance them and ramp up your capacity very fast and very far.&lt;br /&gt;&lt;a href=&quot;http://www.gandi.net/hosting&quot;&gt;&lt;/a&gt;    &lt;br /&gt;For simplicity's sake, let's take a real example.  As some of you already know, we support the
&lt;a href=&quot;http://www.millenium.org/&quot;&gt;Millenium&lt;/a&gt; association in their promotion of online video games.
&lt;br /&gt;
&lt;br /&gt;
The increasing success of the website, &lt;a href=&quot;http://www.millenium.org/&quot;&gt;millenium.org&lt;/a&gt;, made us re-design the architecture of the
website so that it could handle the numerous videos shown on the website to its 17,000 unique visitors per day far more easily and efficiently.&lt;br /&gt;
&lt;br /&gt;
Following a major update of one of the games served by Millenium (WOW patch 3.1), we increased the server power to 16 shares in anticipation of an increase in load. Our expectations were quickly exceeded with over &lt;strong&gt;50,000 unique visitors the first day&lt;/strong&gt;, and just as many over the following days.
&lt;br /&gt;
&lt;br /&gt;
The website received between 500 and 1,000 simultaneous visitors and a large number of videos,  which is not viable for a single LAMP server. We immediately changed the infrastructure, by moving from a unique-server model (which is often the starting choice) to an
infrastructure-based model. We went from a &lt;strong&gt;vertical system&lt;/strong&gt; (more power) to a &lt;strong&gt;horizontal system&lt;/strong&gt; (more
servers):
&lt;br /&gt;
&lt;img src=&quot;http://gandikitchen.net/public/archidnsrobin-en.gif&quot; alt=&quot;archidnsrobin-en.gif&quot; style=&quot;margin: 0 auto; display: block;&quot; title=&quot;archidnsrobin-en.gif, May 2009&quot; /&gt;
&lt;br /&gt;
As you can see in the diagram, we moved the database to a separate server and duplicated the web
server to two machines. The load was therefore split by the domain's DNS (using a simple &lt;a href=&quot;http://en.wikipedia.org/wiki/Round_robin_DNS&quot; hreflang=&quot;en&quot;&gt;DNS round robin&lt;/a&gt; technique). We could also move to
dedicating a 1-share server to load distribution, though such a solution would take a bit longer to
implement. In our case it took 2 minutes to add the shares to the account, 6 minutes to create the 2
servers, 10 minutes to transfer the data, and 2 hours to configure the services.
&lt;br /&gt;
&lt;br /&gt;
Today, the platform easily handles 1 million unique visitors per month, for over 3 million pages
viewed - a good thing! Best of all &lt;strong&gt;the platform is now capable of
evolving&lt;/strong&gt;. If the database suffers, all we need to do is to add more shares to the database server.
If the web front starts to become saturated, we just need to add another.
&lt;br /&gt;&lt;br /&gt;
Because our cloud infrastructure allows you to create as many servers as you want from the hosting resources in your account, you can always add more, and always change your web architecture without replacing physical servers. The&lt;a href=&quot;http://www.gandi.net/hosting&quot;&gt; VPS hosting&lt;/a&gt; system is flexible and allows you to increase from a 1-share server (1/64 of a machine + 1/64 as reserve, 256MB of Ram) to a 16-share server (1/4 of a machine + 1/4 as a reserve, 4GB de Ram) at any time and as often as you want.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find yourself confronted by this type of problem, please feel free to contact us, as we would
be more than happy to help you.
&lt;br /&gt;&lt;br /&gt;Gandi Hosting Team&lt;br /&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>