Scalability best practice

Hi everyone,
I’m new and I’m “playing” with licode to build an infrastructure for our
webrtc call environment.

I’m a little bit confused:
What’s the difference between ErizoController and ErizoAgent?
I mean, I have a main server with nuve and an erizo controller. In another
server, just to make few test, I only deployed the erizoAgent.
When I start the agent on the second server, the first (thanks to rabbit)
will see and register the new agent BUT as ErizoController_someId, not
ErizoAgent_someId.

Is there a benefit to deploy various controller instead of Agents only?
I’m trying to figure out what’s the best configuration for the scalability.

At this point I’ve imagined one main server with Erizo controller, nuve and
an Agent (will be the main agent which never shutdown).
I’ve also modified the agentReporter.js to include some other info such as
network conditions etc. and modified the erizo_controller default policy to
route all the traffic to the main agent until the machine reach some
parameters (cpu_load, memory load network load, etc).
Then, when the limits are reached, a new machine will spawn with only an
agent wich will automatically connect to the “cluster” thanks to rabbit.
I’m in an early stage of developement but it seems working.
Am I on the right track?

Another Question:
I’m not able to find out how to scale down. I’m implementing this feature
as application logic. When the Agent has 0 active JS, the machine will
shutdown.
Is there a nicer method instead of killing the erizo Agent process? How can
I deregister it from nuve with amqper?

Last Question:
I know it’s a “funny” question, but I’ll try: is there a way to switch an
active stream from an erizo Agent to another erizo agent? without interrupt
the stream?

Many Thanks,
Francesco.