Hi, We want to run several blog sites on our server and we are developing our custom software for it. Which do you think is more feasible? hosting all applications on a single rails application or deploying all blogs different diffferent installations (with different databases etc.) I thought different installations is more feasible as they become mutually exclusive, but I see that each single dispatch.fcgi consumes 30 mb of memory; so 20 installations * 4 fcgi * 30 mb = 2.4gb.. So this may be awkward. How does textdrive handles all rails installations? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Wednesday 02 November 2005 14:27, Onur Turgay wrote:> Hi, > We want to run several blog sites on our server and we are developing our > custom software for it. Which do you think is more feasible? hosting all > applications on a single rails application or deploying all blogs different > diffferent installations (with different databases etc.) > > I thought different installations is more feasible as they become mutually > exclusive, but I see that each single dispatch.fcgi consumes 30 mb of > memory; so 20 installations * 4 fcgi * 30 mb = 2.4gb.. So this may be > awkward. How does textdrive handles all rails installations?I would be very interested to hear something about this too :-) Duncan
This is the tipical problem...isolation against resource consumption. In a ideal world, you should have one web server dispathing to K internal web server. So you should have k internal computer, one for every virtual host. This scales well, but cost very much :) The opposite is to have only one rail and one webbrick. I will suggest a mixed approach: for small blogs, cluster them in a single machine, even using a single rail. For big blogs (like for example SlashDot) divide the load, and assign one machine to every rail. You should do some testing before deciding the right way. Duncan Mac-Vicar Prett ha scritto in data 02/11/2005 16.37:>On Wednesday 02 November 2005 14:27, Onur Turgay wrote: > > >>Hi, >>We want to run several blog sites on our server and we are developing our >>custom software for it. Which do you think is more feasible? hosting all >>applications on a single rails application or deploying all blogs different >>diffferent installations (with different databases etc.) >> >>I thought different installations is more feasible as they become mutually >>exclusive, but I see that each single dispatch.fcgi consumes 30 mb of >>memory; so 20 installations * 4 fcgi * 30 mb = 2.4gb.. So this may be >>awkward. How does textdrive handles all rails installations? >> >> > >I would be very interested to hear something about this too :-) > >Duncan >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Giovanni Giorgi http://www.objectsroot.com Be Creative, Be Open Source ............................................................. -- La presente comunicazione potrebbe contenere informazioni riservate e/o protette da segreto professionale ed e'' indirizzata esclusivamente ai destinatari della medesima qui indicati. Se avete ricevuto per errore la presente comunicazione, siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo di e-mail, e a cancellare il presente messaggio dal Vostro sistema. E'' strettamente proibito e potrebbe essere fonte di violazione di legge qualsiasi uso, comunicazione, copia o diffusione dei contenuti di questa comunicazione da parte di chi la abbia ricevuta per errore o in violazione degli scopi della presente. Il messaggio e'' stato analizzato alla ricerca di virus o contenuti pericolosi ed e'' risultato NON infetto.
I think you would be better off creating one rails app that serves all the blogs. This will waste less resources overall and lead to much easier management. Also this way you can start with one server and as your number of blogs grows you can add more fcgi listeners. Once that server is tapped out, you can add another box that will just run fcgi processes delegated to it from the front or main server. This is the great advantage behind fcgi youcan run one front webserver with N number of fcgi processes running on as many backend servers as you need. This is how basecamp does it IIRC. One huge database for everything and accounts separated by the subdomain in the url ie: blogname.myblogservice.com. And then you just constrain your db queries using the subdomain. Cheers- -Ezra On Nov 2, 2005, at 8:16 AM, Giovanni Giorgi wrote:> This is the tipical problem...isolation against resource consumption. > In a ideal world, you should have one web server dispathing to K > internal web server. > So you should have k internal computer, one for every virtual host. > This scales well, but cost very much :) > The opposite is to have only one rail and one webbrick. > I will suggest a mixed approach: for small blogs, cluster them in a > single machine, even using a single rail. > For big blogs (like for example SlashDot) divide the load, and > assign one machine to every rail. > > You should do some testing before deciding the right way. > > > Duncan Mac-Vicar Prett ha scritto in data 02/11/2005 16.37: > >> On Wednesday 02 November 2005 14:27, Onur Turgay wrote: >> >>> Hi, >>> We want to run several blog sites on our server and we are >>> developing our >>> custom software for it. Which do you think is more feasible? >>> hosting all >>> applications on a single rails application or deploying all blogs >>> different >>> diffferent installations (with different databases etc.) >>> >>> I thought different installations is more feasible as they become >>> mutually >>> exclusive, but I see that each single dispatch.fcgi consumes 30 >>> mb of >>> memory; so 20 installations * 4 fcgi * 30 mb = 2.4gb.. So this >>> may be >>> awkward. How does textdrive handles all rails installations? >>> >> >> I would be very interested to hear something about this too :-) >> >> Duncan >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > > -- > > Giovanni Giorgi http://www.objectsroot.com > Be Creative, Be Open > Source ................................. > ............................ > > > -- > > La presente comunicazione potrebbe contenere informazioni riservate > e/o > protette > da segreto professionale ed e'' indirizzata esclusivamente ai > destinatari della > medesima qui indicati. Se avete ricevuto per errore la presente > comunicazione, > siete invitati a segnalarcelo, rispondendo a questo stesso > indirizzo di > e-mail, > e a cancellare il presente messaggio dal Vostro sistema. E'' > strettamente > proibito > e potrebbe essere fonte di violazione di legge qualsiasi uso, > comunicazione, > copia > o diffusione dei contenuti di questa comunicazione da parte di chi > la abbia > ricevuta per errore o in violazione degli scopi della presente. > Il messaggio e'' stato analizzato alla ricerca di virus o contenuti > pericolosi > ed > e'' risultato NON infetto. > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
is there a way that I can seperate database connections based on domain name. i.e. I have one rails app running, but database choice is chanaged based on incoming domain name? On 11/3/05, Ezra Zygmuntowicz <ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org> wrote:> > I think you would be better off creating one rails app that serves > all the blogs. This will waste less resources overall and lead to > much easier management. Also this way you can start with one server > and as your number of blogs grows you can add more fcgi listeners. > Once that server is tapped out, you can add another box that will > just run fcgi processes delegated to it from the front or main > server. This is the great advantage behind fcgi youcan run one front > webserver with N number of fcgi processes running on as many backend > servers as you need. This is how basecamp does it IIRC. One huge > database for everything and accounts separated by the subdomain in > the url ie: blogname.myblogservice.com <http://blogname.myblogservice.com>. > And then you just constrain > your db queries using the subdomain. > > Cheers- > -Ezra > > On Nov 2, 2005, at 8:16 AM, Giovanni Giorgi wrote: > > > This is the tipical problem...isolation against resource consumption. > > In a ideal world, you should have one web server dispathing to K > > internal web server. > > So you should have k internal computer, one for every virtual host. > > This scales well, but cost very much :) > > The opposite is to have only one rail and one webbrick. > > I will suggest a mixed approach: for small blogs, cluster them in a > > single machine, even using a single rail. > > For big blogs (like for example SlashDot) divide the load, and > > assign one machine to every rail. > > > > You should do some testing before deciding the right way. > > > > > > Duncan Mac-Vicar Prett ha scritto in data 02/11/2005 16.37: > > > >> On Wednesday 02 November 2005 14:27, Onur Turgay wrote: > >> > >>> Hi, > >>> We want to run several blog sites on our server and we are > >>> developing our > >>> custom software for it. Which do you think is more feasible? > >>> hosting all > >>> applications on a single rails application or deploying all blogs > >>> different > >>> diffferent installations (with different databases etc.) > >>> > >>> I thought different installations is more feasible as they become > >>> mutually > >>> exclusive, but I see that each single dispatch.fcgi consumes 30 > >>> mb of > >>> memory; so 20 installations * 4 fcgi * 30 mb = 2.4gb.. So this > >>> may be > >>> awkward. How does textdrive handles all rails installations? > >>> > >> > >> I would be very interested to hear something about this too :-) > >> > >> Duncan > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > > > > -- > > > > Giovanni Giorgi http://www.objectsroot.com > > Be Creative, Be Open > > Source ................................. > > ............................ > > > > > > -- > > > > La presente comunicazione potrebbe contenere informazioni riservate > > e/o > > protette > > da segreto professionale ed e'' indirizzata esclusivamente ai > > destinatari della > > medesima qui indicati. Se avete ricevuto per errore la presente > > comunicazione, > > siete invitati a segnalarcelo, rispondendo a questo stesso > > indirizzo di > > e-mail, > > e a cancellare il presente messaggio dal Vostro sistema. E'' > > strettamente > > proibito > > e potrebbe essere fonte di violazione di legge qualsiasi uso, > > comunicazione, > > copia > > o diffusione dei contenuti di questa comunicazione da parte di chi > > la abbia > > ricevuta per errore o in violazione degli scopi della presente. > > Il messaggio e'' stato analizzato alla ricerca di virus o contenuti > > pericolosi > > ed > > e'' risultato NON infetto. > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -Ezra Zygmuntowicz > WebMaster > Yakima Herald-Republic Newspaper > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > 509-577-7732 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 03/11/2005, at 12:27 AM, Onur Turgay wrote:> We want to run several blog sites on our server and we are > developing our custom software for it. Which do you think is more > feasible? hosting all applications on a single rails application or > deploying all blogs different diffferent installations (with > different databases etc.)If they can share the code base (no special code per instance) and you can rework the code into a pretty standard User has_one Blog has_many Posts relationship, you''ll be able to comfortably use one database, and one Rails app. This is what Basecamp, Backpack, Tada, Strongspace, and most other hosted services do -- one app, one database. It''ll be a little more work (especially since you''re part-way through the build) to do this, but the benefits are definitely there.> I thought different installations is more feasible as they become > mutually exclusive, but I see that each single dispatch.fcgi > consumes 30 mb of memory; so 20 installations * 4 fcgi * 30 mb = > 2.4gb.. So this may be awkward. How does textdrive handles all > rails installations?Well, for starters, there''s no way a blog needs 4 FCGI processes -- you could get away with 1, and 2 is actually the maximum we''ll allow without hearing some especially good reasons. I''d make the wild assumption that we (TextDrive) are hosting the vast majority of Rails apps right now, and of those, 99% would be running happily on only 2 FCGI processes. Strongspace is running ~40 processes (I think), but the problem here was that each http file upload consumed one process. Otherwise, it''d happily chug away on 2 processes (and was in our early testing). We''re are running 8GB of RAM per server these days, but it''s easy to see there''s a pretty low ceiling on how many Rails apps we can host on one box -- which is something we''ve been thinking about a lot with the upcoming Rails-only hosting plans. --- Justin French TextDrive.com
Onur- I think this may be what you are looking for: http:// wiki.rubyonrails.com/rails/pages/RailsProductGenerator Check that out, it allows you to run multiple site off of the same code base. And each sub project gets their own database tables. I think this may be the closest thing to what you are trying to do. Cheers- -Ezra On Nov 3, 2005, at 1:01 AM, Onur Turgay wrote:> is there a way that I can seperate database connections based on > domain name. i.e. I have one rails app running, but database choice > is chanaged based on incoming domain name? > > On 11/3/05, Ezra Zygmuntowicz <ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org> wrote: I > think you would be better off creating one rails app that serves > all the blogs. This will waste less resources overall and lead to > much easier management. Also this way you can start with one server > and as your number of blogs grows you can add more fcgi listeners. > Once that server is tapped out, you can add another box that will > just run fcgi processes delegated to it from the front or main > server. This is the great advantage behind fcgi youcan run one front > webserver with N number of fcgi processes running on as many backend > servers as you need. This is how basecamp does it IIRC. One huge > database for everything and accounts separated by the subdomain in > the url ie: blogname.myblogservice.com. And then you just constrain > your db queries using the subdomain. > > Cheers- > -Ezra > > On Nov 2, 2005, at 8:16 AM, Giovanni Giorgi wrote: > > > This is the tipical problem...isolation against resource > consumption. > > In a ideal world, you should have one web server dispathing to K > > internal web server. > > So you should have k internal computer, one for every virtual host. > > This scales well, but cost very much :) > > The opposite is to have only one rail and one webbrick. > > I will suggest a mixed approach: for small blogs, cluster them in a > > single machine, even using a single rail. > > For big blogs (like for example SlashDot) divide the load, and > > assign one machine to every rail. > > > > You should do some testing before deciding the right way. > > > > > > Duncan Mac-Vicar Prett ha scritto in data 02/11/2005 16.37: > > > >> On Wednesday 02 November 2005 14:27, Onur Turgay wrote: > >> > >>> Hi, > >>> We want to run several blog sites on our server and we are > >>> developing our > >>> custom software for it. Which do you think is more feasible? > >>> hosting all > >>> applications on a single rails application or deploying all blogs > >>> different > >>> diffferent installations (with different databases etc.) > >>> > >>> I thought different installations is more feasible as they become > >>> mutually > >>> exclusive, but I see that each single dispatch.fcgi consumes 30 > >>> mb of > >>> memory; so 20 installations * 4 fcgi * 30 mb = 2.4gb.. So this > >>> may be > >>> awkward. How does textdrive handles all rails installations? > >>> > >> > >> I would be very interested to hear something about this too :-) > >> > >> Duncan > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > > > > -- > > > > Giovanni Giorgi http://www.objectsroot.com > > Be Creative, Be Open > > > Source ................................. > > ............................ > > > > > > -- > > > > La presente comunicazione potrebbe contenere informazioni riservate > > e/o > > protette > > da segreto professionale ed e'' indirizzata esclusivamente ai > > destinatari della > > medesima qui indicati. Se avete ricevuto per errore la presente > > comunicazione, > > siete invitati a segnalarcelo, rispondendo a questo stesso > > indirizzo di > > e-mail, > > e a cancellare il presente messaggio dal Vostro sistema. E'' > > strettamente > > proibito > > e potrebbe essere fonte di violazione di legge qualsiasi uso, > > comunicazione, > > copia > > o diffusione dei contenuti di questa comunicazione da parte di chi > > la abbia > > ricevuta per errore o in violazione degli scopi della presente. > > Il messaggio e'' stato analizzato alla ricerca di virus o contenuti > > pericolosi > > ed > > e'' risultato NON infetto. > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -Ezra Zygmuntowicz > WebMaster > Yakima Herald-Republic Newspaper > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > 509-577-7732 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster http://yakimaherald.com 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org