Frequently Asked Questions (FAQ)

From $1

    Table of contents
    1. 1. Do I need an AWS account to use Scalr?
    2. 2. Where do I get my AWS account ID?
    3. 3. How do I update my domain DNS zone when my farm is reconfigured?
    4. 4. Does Scalr configure virtual hosts on app instances?
    5. 5. How does MySQL replication work?
    6. 6. OK, I created an application, built and launched a farm, now what?
    7. 7. Where do I place my files? What are the default directories?
    8. 8. How do I SSH into my instance?
    9. 9. How do I use my private key in Putty?
    10. 10. Does Scalr synchronize my content between Instances for www or app roles?
    11. 11. Can I use Scalr or other tools like Elasticfox simultaneously to control my instances?
    12. 12. What are "Min LA" and "Max LA" settings for Roles?
    13. 13. What are Min Instances and Max Instances?
    14. 14. Will my farms/instances be stopped if I unsubscribe?
    15. 15. How are HTTP requests spread across all load balancer instances?
    16. 16. Can I add my existing AMI/instance into Scalr?
    17. 17. How do I create my custom role/AMI out of a "base" one?
    18. 18. I made changes on instance, clicked "Synchronize to all" and now it won't be recognized by Scalr or MySQL snaphsot not working or it hangs in "Synchronizing…..." state.
    19. 19. I want to run apt-get upgrade on an instance of my custom role. Is there any essential software on scalr AMI that I must keep intact?
    20. 20. My application uses file-based sessions. What if my visitor's requests will be proxied to a different app instances?
    21. 21. What if I need to edit my DNS zone?
    22. 22. How do I know external IP adresses of my roles?
    23. 23. How do I connect to MySQL servers from my application?
    24. 24. How do I reconfigure nginx?
    25. 25. My application tracks IP adresses of visitors. nginx substitutes visitor IP with it's own IP. How do I know a client IP address?

    Do I need an AWS account to use Scalr?

    You do need to have some Cloud infrastructure account, like AWS, Rackspace Cloud, or a private Cloud like Eucalyptus or OpenStack.

    Where do I get my AWS account ID?

    It can be found at http://aws.amazon.com/account/

    How do I update my domain DNS zone when my farm is reconfigured?

    Just set nameservers for your domain to ns1.scalr.net, ns2.scalr.net, ns3.scalr.net, and ns4.scalr.net. Scalr will take care of the rest.

    Does Scalr configure virtual hosts on app instances?

    Yes. Just go to Websites -> Apache Virtual hosts.

    How does MySQL replication work?

    Scalr handles MySQL replication and re-configuration. An Instance serving as MySQL Slave will automatically be promoted to MySQL Master if the precedent Master crashes, is terminated, or becomes unavailable. More on Setup a MySQL cluster.

    OK, I created an application, built and launched a farm, now what?

    Upload your application to an App Instance, then create a server snapshot. Or follow the Getting Started guide.

    Where do I place my files? What are the default directories?

    /var/www for the App role
    /var/www/nginx-default for the www role (usually not needed)

    How do I SSH into my instance?

    Scalr provides a single-click method of logging into one of your servers as root, using Mindterm. On any page that lists an Instance, simply click the black terminal icon and Scalr will use your private key to log you in as root in a Java applet.

    If you would like to connect to an instance using Putty, Terminal, or Cyberduck, click Server Farms->View all, Then click the "View" link next to the Roles count. Next to each Role there's an Options dropdown. Select Download SSH private key. This private key allows you to authenticate on all instances in this farm via an OpenSSH client (ssh -i path/to/privatekey root@instanceip) or Putty.

    How do I use my private key in Putty?

    Follow this manual

    Does Scalr synchronize my content between Instances for www or app roles?

    No, but you can either do this by yourself (a simple rsync script will do the job) or use "Create server snapshot" feature.

    Can I use Scalr or other tools like Elasticfox simultaneously to control my instances?

    You are strongly advised not to. Scalr cannot track any outside changes on your Instances, EBS volumes, Elastic IPs, etc., and you can face with unexpected behavior as a result. For example, assigning an Elastic IP to an instance via Elasticfox will mess up your Scalr Elastic IPs.

    What are "Min LA" and "Max LA" settings for Roles?

    LA is a common abbreviation for "Load Average". You can read more on this in this Wikipedia article . Scalr scales your Role based on average LA on all instances for last 15 minutes. If LA grows higher than your Max LA setting, a new instance is started. If LA falls below your Min LA setting, one instance is terminated.

    What are Min Instances and Max Instances?

    Scalr will keep a number of running instances of a particular role between Min and Max, regardless of LA limits. If you set a Max of 10, Scalr will never start a new Instance that would bring the count over 10.

    Will my farms/instances be stopped if I unsubscribe?

    No, they will keep running. But you will no longer be able to control them from the Scalr web interface; Scalr will not monitor them, nor will it scale them.

    How are HTTP requests spread across all load balancer instances?

    Scalr adds the public IP addresses of all load balancer instances to your Application DNS Zone. This is DNS round-robin. Different visitors (different DNS requests) are spread across different load balancer instances.

    Can I add my existing AMI/instance into Scalr?

    You can use one of Scalr's pre-made instances, build off the premade "base" role, or Import a non-Scalr server.

    How do I create my custom role/AMI out of a "base" one?

    Include a base role when creating a new farm, or edit an existing farm and add one. Select an Instance of that base role and use the "Create server snapshot" option. You will be asked to give it a new role name. The new Role will only be accessible by you.

    I made changes on instance, clicked "Synchronize to all" and now it won't be recognized by Scalr or MySQL snaphsot not working or it hangs in "Synchronizing…..." state.

    "Synchronize to all" has been replaced by "Create server snapshot" in Scalr 2.0, but if you are still using 1.0, then:

    Make sure that you did not mess essential scalr programs on your instance.
    Four things that you should never do when customizing your instance:
    1. Deleting/disabling snmpd and snmptrapd
    2. Disabling PermitRootLogin or PubkeyAuthentication, changing Port in sshd_config
    3. Removing scalr public key from /root/.ssh/authorized_keys
    4. Delete the following packages or invalidate their dependencies: ec2tools, s3cmd

    I want to run apt-get upgrade on an instance of my custom role. Is there any essential software on scalr AMI that I must keep intact?

    Make sure that SNMPd is running after the upgrade. Some important dirs that must not be touched: /etc/aws, /usr/local/aws. Finally, be careful when modifying /etc/rc.local.

    My application uses file-based sessions. What if my visitor's requests will be proxied to a different app instances?

    This wont happen. Nginx is configured to keep visitors bundled to a specific backend server (based on his IP, User-Agent etc).

    What if I need to edit my DNS zone?

    You can do that in Websites -> DNS zones.

    How do I know external IP adresses of my roles?

    You can use ext-ROLENAME.domain

    How do I connect to MySQL servers from my application?

    Like with any master-slave replication, it is important that your application writes only to Master and reads from any Slave. This is because slaves are only reading changes from master.

    Here is some simple PHP code that will list your MySQL master hosts (to write to) and all MySQL slaves (to read from):

    $mysql_slaves  = array_map('basename', (array)@glob('/etc/scalr/private.d/hosts/mysql-slave/*')); 
    $mysql_masters = array_map('basename', (array)@glob('/etc/
    scalr/private.d/hosts/mysql-master/*'));
    $mysql_all = array_merge($mysql_slaves, $mysql_masters);

    A simpler way is to use int-rolename.yourdomain dynamic hostnames that resolve to internal IP adresses. Say, you have launched application example.com. MySQL master in this case will be accessible as int-mysql-master.example.com and one random mysql instance will be int-mysql.example.com

    How do I reconfigure nginx?

    Edit /etc/nginx/nginx.conf and issue "killall -HUP nginx" command.

    My application tracks IP adresses of visitors. nginx substitutes visitor IP with it's own IP. How do I know a client IP address?

    nginx passes IPs in the X-Real-IP HTTP header. Modify your application to use this header instead, or set up the mod_rpaf Apache module (no code modifications will be needed in this case).

    Tags: (Edit tags)
    • No tags
     
    Comments (2)
    Viewing 2 of 2 comments: view all
    In regards to "My application uses file-based sessions. What if my visitor's requests will be proxied to a different app instances?."

    This might be true in a sense, but won't you run the risk of loosing user's session data *if* the farm scales down and the instance effected happens to hold the session data?
    Posted 07:04, 25 Mar 2011
    @ milanz@gmail.com

    yes this is true. Even with sticky sessions during a downscale session data could be lost.

    True session clustering can take place via a shared file system (e.g. GlusterFS) or if sessions are stored in the DB.
    Posted 22:55, 2 Dec 2011
    Viewing 2 of 2 comments: view all
    You must login to post a comment.

     
    Powered by MindTouch Core