multi-tented connection queues
Hi All, I am doing a case study to make tomcat to host multi-tented web applications. i.e., a single web application/service container is serving logically partitioned customers. For the basic implementation (let’s say number of customers/tenant are 2) I want to make following modifications. 1) Identify the tenant and implementing a request/connection queues for each tenant. Then queue will have ‘acceptcount’ which reject the system to avoid severe overloads. 2) The worker threads have to be allocated to serve these requests based on a new scheduling. Two queues will be processed by this scheduler based on a priority scheme. After looking at the code, currently a single connection queue (ServerSocket.listen(backlog)) is used which is not aware about the tenants request. However, for the implementation we need another level of queuing which will reject the requests based on the tenant. Please suggest a way to implement such a scheme. Thank you Pati
Re: multi-tented connection queues
Tharindu Patikirikorala wrote: Hi All, I am doing a case study to make tomcat to host multi-tented web applications. i.e., a single web application/service container is serving logically partitioned customers. For the basic implementation (let’s say number of customers/tenant are 2) I want to make following modifications. 1) Identify the tenant on the base of what ? and implementing a request/connection queues for each tenant. Then queue will have ‘acceptcount’ which reject the system to avoid severe overloads. 2) The worker threads have to be allocated to serve these requests based on a new scheduling. Two queues will be processed by this scheduler based on a priority scheme. After looking at the code, currently a single connection queue (ServerSocket.listen(backlog)) is used which is not aware about the tenants request. However, for the implementation we need another level of queuing which will reject the requests based on the tenant. Please suggest a way to implement such a scheme. Unless this is a purely academic exercise and you insist in doing it in Tomcat, my feeling is that this kind of scheme would be much better implemented at the level of a front-end, which could conditionnally forward requests to one or more Tomcat instances/ports/applications, based on whatever discrimination factors you choose to implement. In other words, why re-invent the wheel ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: multi-tented connection queues
On 10/01/2012 12:25, Tharindu Patikirikorala wrote: Hi All, I am doing a case study to make tomcat to host multi-tented web applications. i.e., a single web application/service container is serving logically partitioned customers. For the basic implementation (let’s say number of customers/tenant are 2) I want to make following modifications. 1) Identify the tenant and implementing a request/connection queues for each tenant. Then queue will have ‘acceptcount’ which reject the system to avoid severe overloads. Queue of what? Tomcat doesn't have any queues. Queuing is usually associated with messaging products or applications. 2) The worker threads have to be allocated to serve these requests based on a new scheduling. Two queues will be processed by this scheduler based on a priority scheme. Sounds like an application problem. A messaging application problem. After looking at the code, currently a single connection queue (ServerSocket.listen(backlog)) is used which is not aware about the tenants request. However, for the implementation we need another level of queuing which will reject the requests based on the tenant. You are referring to the Connector. The Connector processes requests. You could extend it yourself to do whatever you wanted, but you are probably just better creating a separate instance for each tenant and starting it in its own JVM. See RUNNING.txt for details of how to separate CATALINA_HOME and CATALINA_BASE so you can use a common runtime for multiple instances. p Please suggest a way to implement such a scheme. Thank you Pati -- [key:62590808] signature.asc Description: OpenPGP digital signature