For me, I would add customer_id in the tables, and make sure
that
one "customer" only could see his data. Then you
can easily scale.
Also just let the "customer" login. There
"record" will tell you who
they are,
and you can go from there.
You can also do the different dns names, but dns's are a
pain, and
also take a while to populate.
Also that means you can have a single mongrel_cluster, and a
nginx
proxy to handle the whole mess.
Otherwise you memory usage is going to get interesting.
Did something similar for a network management application
I've done
before.
On Dec 21, 6:19 am, Giridhar Tatavarty
<ruby-forum-incom... andreas-
s.net> wrote:
> Hi All,
>
> I have an rails application which is designed to
connect to one db and
> work at 1 url. Let say i want to host it 10 customers
>
> like
>
> http://customer1.coolapp
.com ->customer1 dbhttp://customer2.coolapp
.com ->customer2 dbhttp://customer3.coolapp
.com ->customer3 db
> ...http://cu
stomer10.coolapp.com->customer4 db
>
> What is the best way to deploy the application?
> Option 1: have multiple code trees for each customer
and thus each
> customer having his own rails app and use
apache/lighttpd to route the
> requests much likehttp://duncand
avidson.com/archives/154
>
> Option 2: have a single code tree and depending upon
the request url,
> connect to the appropriate database, much likehttp://wik
i.rubyonrails.org/rails/pages... Databases.
>
> I will have some customer specific datafiles.
>
> Which of the approaches is a scalable and maintainable,
for lets say
> 100-1000 customers.
>
> Thanks in Advance.
> --
> Posted viahttp://www.ruby-forum.com
/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deployment googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---
|