allow to configure pool

(cherry picked from commit 97b05db0255fb3dfffce2617bf54d5619ed49094)