On 06/20/2011 02:44 PM, Pedro Belo wrote:
Hi Steven,

Heroku apps can only have one process binding to a port. Even if it
allowed multiple, you'd still need to define where you want to mount
them in relation to the App URL. For instance, would
app.heroku.com/abc point to api or web?

And that's why joining web and api together with Rack URLMap is the
best solution imo.
Thanks, I wasn't aware of Rack::URLMap. Nor was the documentation really forthcoming with how to use it, plus it adds an additional layer of nesting separate from my app-level url structure which really puts me off.


So why do you want to scale web processes individually?
Because I don't want to be unable to handle api requests due to all dynos handling frontend requests.

Thanks for your input.
Steven!


On Mon, Jun 20, 2011 at 1:25 PM, "Steven! Ragnarök"
<ste...@nuclearsandwich.com>  wrote:
Hello,

I'm currently working on a Ruby project which consists of an API application
and a lightweight frontend application powered by Grape[1] and Sinatra[2]
respectively.

I am wondering what the best way to share resources (code and database
access) between the two is on the Celedon Cedar stack.

My first instinct is to use mount both in a single rack instance but this
prevents me from being able to scale them individually.

My second would be to create Procfile entries like:
  api: rackup -s thin api.ru
  web: rackup -s thin web.ru
but I don't know how Heroku manages web server processes.

My third and final thought would be to manage these as two separte Heroku
applications. Would it be possible for them to share the same Postgres and
RedisToGo instances if we do this?

Thanks in advance for your help.

--
Steven! Ragnarök
ste...@nuclearsandwich.com
http://www.nuclearsandwich.com

--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.




--
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to