supertokens-node
supertokens-node copied to clipboard
Use keepAlive: true in axios calls
the way we use axios in our supertokens node library, it will not perform well under heavy load.. each axios call will try to establish a TCP connection to the server where supertokens core is running. It would be better idea to create an axios object with keepAlive: true (which will keep the TCP connection alive even after request is over and any successive request to supertokens core server, it will not spend time in making TCP connection, nor using up any extra TCP socket which can be used to serve more incoming requests and the response time will be significantly better)