Welcome Guest, Not a member yet? Register   Sign In
Interesting `theory` for Codeigniter and Cloud setup configuration for web apps
#1

[eluser]CI Freak[/eluser]
I want to build several web apps based on codeigniter on the rackspace cloud. Im thinking of the best way to do this and this is one of the ideas ive had.

It comes in 2 parts really, First Codeigniter, then Server Setup

Codeigniter:

I want to be able to update all of the apps easily, so for example when a new version of codeigniter comes out its easy to upgrade all the apps in one go (on a test platform first of course). The second advantage is i would only need one codebase for all of the apps, in a sense anyway. Each app would have its own application folder.

Customers that use these web apps will access their accounts via:

user123 (dot) product-one.com
user_abc (dot) product-two.com

so and so fouth.

I could modify the router to work out which app is being accessed and load the appropriate application folder.

Server Side

Im not sure of the best way to start, so ill start with this:

Load Balancer -> Multiple Cloned Web Server (Apache PHP) -> Applications MYSQL Load Balancer -> Replicated MySql Servers

Load Balancer
-------------

Each of the products domains would resolve to the load balancer in the following fasion

*.product-one (dot) com
*.product-two (dot) com
*.product-three (dot) com

so a request for someuser (dot) product-two (dot) com would be routed through to the load balancer, which would forward it onto one of the web servers that sit behind it.

Cloned Web Servers
------------------

Because of the way CI is setup, they can all be the same, and can be saved as an image, so adding and removing them takes minutes. If you need to inrease resources quickly, you could just spawn 5 extra servers and put them behind the load balancer in a short period of t ime. I also kind of feel its a simple way to achieve what i want, and dont see the point in making things more complex then they need to be *unless* theres a good reason to do so of course.

Application (Specific) MySQl Load Balancer
--------------------------------

Each application would have it's own 'MySql Load Balancer -> Mysql Servers' setup, As i could modify CI to also choose a different MySql Server IP for each application.

Replicated MySql Servers
------------------------

Each Applications MySql Servers will be cloned, and can be replicated in realtime. Again if i need to increase mysql resources, i can just start some new servers from an image, replicate them in sync with the rest of the MySql Servers, and stick it behind the MySql Load Balancer.


..... ok, that was alot, im not sure how clearly ive explained that. What are the pro's and cons of a setup like this, what do you think of it? are there any serious (or minor) flaws i havent taken into account, im sure there will be some.




Theme © iAndrew 2016 - Forum software by © MyBB