Architecture and Scalability

Hi everyone!

First of all, happy new year! One of my intentions of this year is to write more often in my blog, we’ll see next year.

Today I will talk about Architecture and Scalability of systems. This post is just to show my last presentation at Incubio about this interesting topic. At this presentation I’ve developed a slides to teach all the startups (engineers and CEOs) about how important is to think in the scalability from the very beginning of the project. Why? Because, the most of the startups just have 1 shoot, and once they made this shoot and they are successful, they need to grow, and their infrastructure too. Taking care of small details in the early stages could save lot of money in next stages.

 

If you have any comments, please feel free to ask! I have a part of the speech recorded, I’ve got some technical problems and I just have the first 20 minutes, I hope I will repeat this speech and get fully recorded, if you want it, ask for it and I will try to upload to youtube.
Stay cloud!

Where the cloud make sense @aws

Hi again!

Today I want to talk about the cloud and when cloud make sense. Today no just words, let’s see with a real case.

As you provably know, the cloud really exists. There are companies like Amazon AWS, Rackspace and others who offer their service of hardware renting for your personal use. What’s the difference between this cloud companies and your normal hosting company who can rent their servers? At the first time you can think that there is no difference. When you take a look more closely, you start seeing some differences, some details and added services that a normal company doesn’t offer. Enough important to take the decision to move to the cloud and not to a conventional hosting service.

The most important differences between each are the following: Data migration, data replication, fault tolerance infrastructure, fast recovery services and other value added services that hosting companies doesn’t offer like CDN, distributed file systems, etc.

As you can see there are a lot of services that a small/normal hosting company couldn’t offer. For this reason cloud services are a really good option to deploy your infrastructure.

Let’s see the real case where the cloud make really sense. In this graphic you can see an abrupt increase of demand. This case is a real case of a production platform.

Captura de pantalla 2013-03-14 a las 14.47.31

 

In a normal histogram the line rarely grow over 15. What happens if you receive this sudden increase of demand? In a normal infrastructure you provably offer a bad service or directly not offering to your clients. In a cloud infrastructure you just deploy more instances and make this work done it.

This case is based on a encoding video queue. Unexpectedly you can receive an big amount of demand, in a normal infrastructure, you can’t do anything. In a cloud infrastructure, you can try to deploy a new instance and balance demand over the new instance. This is really interesting when you could have unexpected spikes of demand and you want to increase your power service just for a few moments. The best of all is that this increase of power could just be less than 1$, depending on your instance types and the time you’ll need to get the demand out.

What’s important to know about the cloud and this example? The cloud it is just interesting when your infrastructure could scale. And this is something that people doesn’t tell, or doesn’t understand very well. If my new instance could take a piece of the demand my graph is showing me it is because my software architecture has been developed to support this new instance.

In conclusion, cloud it’s great, in my opinion really great, but, and that’s very important, your architecture has to be prepared for new instances and you’ll have to manage your demand to get this new instance work. Once you’re sure your architecture can deal with this inconvenience, you’re prepared to the cloud!

 

Working with local Git and remote

Hi everyone!

Today I will talk about Git. As I suppose you know very well, or at least, you know a little bid of what is it. Git is a code version control software. There are others like SVN, Mercurial… but today I will talk about working with Git locally and deploy your source changes into remote machines. If you need more information about Git, check wikipedia, always useful ;). Link

First of all you have to have Git installed, this guide is quite simple and help you to install GIT in any OS.

Once we have git, we can initialize our first repo.

git init
git add *
git commit -m "First commit with all my initial source"

Here we have the first step, and this could be enough if you’re not going to deploy your code outside your box.

For example, if you have your webserver and you want to deploy your local changes in the source, you may have to do something like this. Other reason could be to have a external backup. If your source is replicated in other box, the possibilities of loosing all your work decreases, everything fails, sooner than you think 😉

Remote repos

In this example I will deploy my changes to my Amazon AWS EC2 machine.

I connect throw SSH to the machine and type this commands:

ssh git@aws-example.com
mkdir -p /var/git/example
cd /var/git/example
git init --bare
exit

Now what we have to do is add a remote repository to our local repo.

We go to your local repo directory and type:

git remote add aws git@aws-example.com:/var/api/example
git push -u aws master

At this point, we have replicated our repo in the cloud ;D easy, isn’t it?

Now what we want to do is to deploy our repo into the working directory, for example the Apache2 directory. In our remote machine, we go to the working directory and type the following:

cd /var/www/workingDirectory
git clone /var/git/example .

At this time we create a copy of the repo, with master branch prepared to serve your pages!

Now any changes you push to AWS you’ll have to enter in your working directory and pull changes. Easy!

cd /var/www/workingDirectory
git pull origin master

First post of GIT, more tricks soon!

Stay in the cloud!

Uso de cookies

Este sitio web utiliza cookies para que usted tenga la mejor experiencia de usuario. Si continúa navegando está dando su consentimiento para la aceptación de las mencionadas cookies y la aceptación de nuestra política de cookies, pinche el enlace para mayor información.plugin cookies