Cloud computing has been one of the most popular distributed computing paradigms. Elasticity is a crucial feature that distinguishes cloud computing from other distributed computing models. It considers the resource provisioning and allocation processes can be implemented automatically and dynamically. Elasticity feature allows cloud platforms to handle different loads efficiently without disrupting the normal behavior of the application. Therefore, providing a resource elasticity analytical model can play a significant role in cloud resource management. This paper presents Controlling Elasticity (ControCity) framework for controlling resources elasticity through using “buffer management ” and “elasticity management ”. In the proposed framework, there are two essential components called buffer manager and elasticity manager in the application layer and middleware layer, respectively. The buffer management controls the input queue of the user's request and the elasticity management controls the elasticity of the cloud platform using learning automata technique. In the application layer, applications are received by cloud applications and, then, placed in the control of the buffer. Buffer manager controls the queue of requests, and elasticity manager of the middleware layer using the learning automata provides a solution for controlling the elasticity of the cloud platform. The experimental results indicate that the ControCity reduces the response time by up to 3.7%, and increases the resource utilization and elasticity by up to 8.4% and 5.4%, respectively, compared with the other approaches.