How bolts and spouts are shared among workers?

一世执手 提交于 2019-12-22 01:35:03

问题


Let's say that I have 2 spouts and 3 bolts in Storm cluster and there are two worker nodes. Will be these spouts and bolts shared among these workers (for example first worker has 1 spout and 2 bolts, the second has 1 spout and 1 bolt) or each worker has 2 spouts and 3 bolts which ends up with 4 spouts and 6 bolts in whole cluster?


回答1:


Spout and bolt are shared by all your cluster (so worker).

If you have 2 spouts and 3 bolts for 2 workers, they will be balanced between your 2 workers. You can use the ui (./nimbus ui) to visualise that :).




回答2:


In storm, a supervisor has multiple worker(processes) slots. By default Storm uses even scheduler to schedule #executors(threads that execute spouts/bolt logic) on #worker_slots that are available. You can find the code to different scheduler implementations here.



来源:https://stackoverflow.com/questions/20313177/how-bolts-and-spouts-are-shared-among-workers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!