mistercrunch edited a comment on issue #8574: [SIP-26] Proposal for 
Implementing Connection Pooling for Analytics Database Connections
URL: 
https://github.com/apache/incubator-superset/issues/8574#issuecomment-571690999
 
 
   I think allowing for people to configure their connection pool is a great 
thing, let's provide ways to do this. I see two main approaches as well as a 
hybrid.
   
   **1 - by config:** Doing it as configuration, in `superset_config.py`. If 
going that route,  I think it's best to give user the full power of 
configuration as code, and allow them to pass an instantiated `SQLAlchemy` pool 
object. This enables them to use whatever pool class they see fit, and use 
whatever parameter they want. In theory they could even create their own pool 
class here and do as they see fit. This should probably be a `dict` keyed by 
`database_name` using instantiated pool objects as values.
   
   **2 - in UI** Doing it in the UI, and expose only the common pool type(s) 
and parameters that matter. This is likely to be simple at first (only allow 
`QueuePool` and common parameters like `pool_size, max_overflow, timeout, 
use_lifo`). An alternative and less form-heavy approach would be to use the 
current `Extra` json approach and add a key for `queue_pool_parameters` and 
document how people can pass things like `pool_size, max_overflow, timeout, 
use_lifo`.
   
   **3 - hybrid** A hybrid approach could be easy to implement to, where we 
look for the dict config and fall back on the UI config.
   
   For reference, where `Extra` looks like today:
   <img width="1183" alt="Screen Shot 2020-01-07 at 9 39 57 AM" 
src="https://user-images.githubusercontent.com/487433/71915961-b7800380-3131-11ea-94f4-97b04336223c.png";>
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to