tenantable icon indicating copy to clipboard operation
tenantable copied to clipboard

why do we need to purge connections ?

Open francoismart opened this issue 9 years ago • 2 comments

Hello,

Why is the connection purged (disconnected/reconnected) during an http request ? Is it a concurrency issue ?

Thanks in advance for your help francois

francoismart avatar Nov 20 '16 12:11 francoismart

Can you add more detail on this issue where and how to produce it.!

vrkansagara avatar Nov 21 '16 09:11 vrkansagara

Hello It's just a question in fact. As I'm evaluating this lib, i'm questionning myself on why in the documentation there's the following workflow ::


This is how things work during a HTTP request: ...... Then the default database connection is changed to 'tenant' and the connection purged (disconnected/reconnected).

The app.url config is set the tenants domain. If a match isn't found in either tables a TenantNotResolved event is fired and no config changes happen.


I'm really interested in why the connection is reseted for each http request. This could be somewhat limiting under heavy traffic

So there's probably a good reason. And I'm requesting some help to understand this good reason.

I guess disconnect / reconnect comes at a certain cost

francoismart avatar Nov 22 '16 16:11 francoismart