Abstract. The paper is focused on a solution providing middleware control over both message passing and scaling in a cloud environment. We provide a detailed analysis of the issue and present the restrictions particular to the load-balancing and communications systems. We also justify the need of such middleware development for a cloud infrastructure. The paper describes the problems emerged while working on a concrete project and presents the results obtained so far.