how to optimize hotspot web server with high concurrent load

Hello mikrotik community. I have used mikrotik in the university with high concurrent load every thing is ok but when hotspot client have active more than 5,000 active we have the problem with the mikrotik webserver it can’t redirect to our external web log in. how to implement or optimize mikrotik webserver ? ( we use CCR1072)
P.S. sorry for my bad english.