Hello, I am developing a rails application and have encountered the problem of splitting up traffic coming to the domain. As an example, I would like to mention that let''s say we have 5 visitors per day to the domain. We want to split the traffic and redirect them to different locations: example.com - Redirecting each visitor to different URL Visitors 1 is redirected to - redirect_to("http://www.example1.com/") Visitors 2 is redirected to - redirect_to("http://www.example2.com/") Visitors 3 is redirected to - redirect_to("http://www.example3.com/") Visitors 4 is redirected to - redirect_to("http://www.example4.com/") Visitors 5 is redirected to - redirect_to("http://www.example5.com/") Any idea how this can be accomplished? Thanks a lot in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
have you looked at mongrel clustering for example? -- jon http://technicaldebt.com On Feb 24, 1:49 pm, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > I am developing a rails application and have encountered the problem > of splitting up traffic coming to the domain. As an example, I would > like to mention that let''s say we have 5 visitors per day to the > domain. We want to split the traffic and redirect them to different > locations: > > example.com - Redirecting each visitor to different URL > > Visitors 1 is redirected to - redirect_to("http://www.example1.com/") > Visitors 2 is redirected to - redirect_to("http://www.example2.com/") > Visitors 3 is redirected to - redirect_to("http://www.example3.com/") > Visitors 4 is redirected to - redirect_to("http://www.example4.com/") > Visitors 5 is redirected to - redirect_to("http://www.example5.com/") > > Any idea how this can be accomplished? > > Thanks a lot in advance-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you Jon, but I am more looking for a simpler solution, because in the real world scenario I will have 10 different domains, so I have to split the traffic for each of them to different URL. On Feb 25, 8:46 am, Jon Kern <jonker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> have you looked at mongrel clustering for example? > > -- jonhttp://technicaldebt.com > > On Feb 24, 1:49 pm, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello, > > > I am developing a rails application and have encountered the problem > > of splitting up traffic coming to the domain. As an example, I would > > like to mention that let''s say we have 5 visitors per day to the > > domain. We want to split the traffic and redirect them to different > > locations: > > > example.com - Redirecting each visitor to different URL > > > Visitors 1 is redirected to - redirect_to("http://www.example1.com/") > > Visitors 2 is redirected to - redirect_to("http://www.example2.com/") > > Visitors 3 is redirected to - redirect_to("http://www.example3.com/") > > Visitors 4 is redirected to - redirect_to("http://www.example4.com/") > > Visitors 5 is redirected to - redirect_to("http://www.example5.com/") > > > Any idea how this can be accomplished? > > > Thanks a lot in advance-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 25 February 2011 08:17, Maxo <malkhaz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you Jon, but I am more looking for a simpler solution, because > in the real world scenario I will have 10 different domains, so I have > to split the traffic for each of them to different URL.Why? Colin> > On Feb 25, 8:46 am, Jon Kern <jonker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> have you looked at mongrel clustering for example? >> >> -- jonhttp://technicaldebt.com >> >> On Feb 24, 1:49 pm, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >> > Hello, >> >> > I am developing a rails application and have encountered the problem >> > of splitting up traffic coming to the domain. As an example, I would >> > like to mention that let''s say we have 5 visitors per day to the >> > domain. We want to split the traffic and redirect them to different >> > locations: >> >> > example.com - Redirecting each visitor to different URL >> >> > Visitors 1 is redirected to - redirect_to("http://www.example1.com/") >> > Visitors 2 is redirected to - redirect_to("http://www.example2.com/") >> > Visitors 3 is redirected to - redirect_to("http://www.example3.com/") >> > Visitors 4 is redirected to - redirect_to("http://www.example4.com/") >> > Visitors 5 is redirected to - redirect_to("http://www.example5.com/") >> >> > Any idea how this can be accomplished? >> >> > Thanks a lot in advance > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Because we are testing different ways to monetize the traffic and want to split them to send to multiple providers like (Valueclick, Rightmedia, etc...) After that we are gathering the information regarding the revenue per provider and doing analysis. After the analysis, we are amending our traffic redirection method to send the traffic to the provider with is paying the highest. Maxo On Feb 25, 1:28 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 25 February 2011 08:17, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Thank you Jon, but I am more looking for a simpler solution, because > > in the real world scenario I will have 10 different domains, so I have > > to split the traffic for each of them to different URL. > > Why? > > Colin > > > > > > > On Feb 25, 8:46 am, Jon Kern <jonker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> have you looked at mongrel clustering for example? > > >> -- jonhttp://technicaldebt.com > > >> On Feb 24, 1:49 pm, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > Hello, > > >> > I am developing a rails application and have encountered the problem > >> > of splitting up traffic coming to the domain. As an example, I would > >> > like to mention that let''s say we have 5 visitors per day to the > >> > domain. We want to split the traffic and redirect them to different > >> > locations: > > >> > example.com - Redirecting each visitor to different URL > > >> > Visitors 1 is redirected to - redirect_to("http://www.example1.com/") > >> > Visitors 2 is redirected to - redirect_to("http://www.example2.com/") > >> > Visitors 3 is redirected to - redirect_to("http://www.example3.com/") > >> > Visitors 4 is redirected to - redirect_to("http://www.example4.com/") > >> > Visitors 5 is redirected to - redirect_to("http://www.example5.com/") > > >> > Any idea how this can be accomplished? > > >> > Thanks a lot in advance > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Feb 25, 12:00 pm, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Because we are testing different ways to monetize the traffic and want > to split them to send to multiple providers like (Valueclick, > Rightmedia, etc...) After that we are gathering the information > regarding the revenue per provider and doing analysis. After the > analysis, we are amending our traffic redirection method to send the > traffic to the provider with is paying the highest. >i don''t yet understand the problem. Why can''t you do if foo redirect_to site1 elsif bar redirect_to site2 ... end Fred> Maxo > > On Feb 25, 1:28 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > On 25 February 2011 08:17, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Thank you Jon, but I am more looking for a simpler solution, because > > > in the real world scenario I will have 10 different domains, so I have > > > to split the traffic for each of them to different URL. > > > Why? > > > Colin > > > > On Feb 25, 8:46 am, Jon Kern <jonker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> have you looked at mongrel clustering for example? > > > >> -- jonhttp://technicaldebt.com > > > >> On Feb 24, 1:49 pm, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> > Hello, > > > >> > I am developing a rails application and have encountered the problem > > >> > of splitting up traffic coming to the domain. As an example, I would > > >> > like to mention that let''s say we have 5 visitors per day to the > > >> > domain. We want to split the traffic and redirect them to different > > >> > locations: > > > >> > example.com - Redirecting each visitor to different URL > > > >> > Visitors 1 is redirected to - redirect_to("http://www.example1.com/") > > >> > Visitors 2 is redirected to - redirect_to("http://www.example2.com/") > > >> > Visitors 3 is redirected to - redirect_to("http://www.example3.com/") > > >> > Visitors 4 is redirected to - redirect_to("http://www.example4.com/") > > >> > Visitors 5 is redirected to - redirect_to("http://www.example5.com/") > > > >> > Any idea how this can be accomplished? > > > >> > Thanks a lot in advance > > > > -- > > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Feb 25, 2011 at 6:00 AM, Maxo <malkhaz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Because we are testing different ways to monetize the traffic and want > to split them to send to multiple providers like (Valueclick, > Rightmedia, etc...) After that we are gathering the information > regarding the revenue per provider and doing analysis. After the > analysis, we are amending our traffic redirection method to send the > traffic to the provider with is paying the highest. >You''re taking the long way around to get to the front of the barn. By looking at what each of these providers pays to you on a per click or per referral basis will do half or more of the work for you. You don''t need to start redirecting traffic to figure out who is going to pay you more. You need a calculator and a hypothetical number of users. If you''re insisting on taking the long route then you can just place the list of redirect domains into an array and randomly select one each time a user comes to the site. Alternately you can keep track of what number user has arrived by using an instance variable counter. The counter number matches a position in the array that the domains are kept in. Each time the counter increments it uses the domain for that position to redirect to. At the end of the array, reset the counter. B. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks a lot Bryan. I think, now I am on the right track. Maxo On Feb 25, 6:45 pm, Bryan Crossland <bacrossl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Fri, Feb 25, 2011 at 6:00 AM, Maxo <malk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Because we are testing different ways to monetize the traffic and want > > to split them to send to multiple providers like (Valueclick, > > Rightmedia, etc...) After that we are gathering the information > > regarding the revenue per provider and doing analysis. After the > > analysis, we are amending our traffic redirection method to send the > > traffic to the provider with is paying the highest. > > You''re taking the long way around to get to the front of the barn. By > looking at what each of these providers pays to you on a per click or per > referral basis will do half or more of the work for you. You don''t need to > start redirecting traffic to figure out who is going to pay you more. You > need a calculator and a hypothetical number of users. > > If you''re insisting on taking the long route then you can just place the > list of redirect domains into an array and randomly select one each time a > user comes to the site. Alternately you can keep track of what number user > has arrived by using an instance variable counter. The counter number > matches a position in the array that the domains are kept in. Each time the > counter increments it uses the domain for that position to redirect to. At > the end of the array, reset the counter. > > B.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.