I read some comment on reddit and this page, some people talked, EOS uses 21 BPs as active, and all of rest are standby. So I think EOS will use a server as a gateway to handle this like HAProxy, right? If it right so HAProxy will determine, which BP is active or standby, is it true?
There is no single "central" server in a decentralized project like EOS.IO.
All block producers, active or standby, maintain the same database containing everyone's votes on block producers. Simplifying a bit, at any moment, the 21 block producers with the most votes are active, and the others are standby. Any vote change is a transaction, it must be signed by the voting user and validated by 15/21 active block producers to take effect.
So, as we can see, no single server has control of who is active and who is standby. It is entirely determined by votes. Voting is done on-chain, and is therefore protected by the same consensus mechanism as any other transaction.