tedis icon indicating copy to clipboard operation
tedis copied to clipboard

pool best practices

Open colorao opened this issue 3 years ago • 2 comments

Hi, Im just new to Tedis and have some doubts.

1. timeour? What this parameter means? Is it a timeout ? If so, what units? seconds? milliseconds? What is it for? could you provide some reasonable initial value or tiop on it ?

2. Pool Does it creates a pool of TCP connections to be reused in a round robin manner? But what is a best practice to use it?

Should I pick a tedis for every operation I want to do ?

  • getTedis()
  • do one insert
  • putTedis()

Or pooling is better designed for a more continuous use:

  • getTedis()
  • do one insert
  • do one reading
  • do another insert
  • do another reading
  • .....
  • putTedis()

I'm working on a plattform in which we expect even hundreds of thousands of concurrent users at time. Any advice or tip will be highly appreciated.

Thanks in advanced !!

colorao avatar Oct 08 '21 12:10 colorao

The current version of link pooling is not elegantly designed and requires users to manually manage connection instances. We will redesign it later to be concurrent while being indifferent to the caller.

dasoncheng avatar Oct 13 '21 07:10 dasoncheng

@dasoncheng sorry, but your answer is not answer to OP question. Right now I have the same question as OP has. What is the best approach in the current situation do we need use, to work with pool?

Thanks

ValeriyDP avatar Dec 23 '21 12:12 ValeriyDP