Nodejs socket uses setInterval to cause bandwidth to run full.

my code keeps using setinterval to fetch redis data (redis is on another server). Dozens of people access the network outflow bandwidth (bit/s) of the redis server at the same time.
whether there should be a cache or what dozens of people access at the same time causes dozens of links to request more REDIS users to increase bandwidth exponentially

   //  
    io.sockets.on("connection", function (socket) {  
      
        //console.log("...");  
        //  
        onlineCountPP;  
        var domain = socket.handshake.headers.origin;

        if(typeof domain == "undefined"){
            return;
        }

        
            
            socket.volatile.emit("onlinenums", {polotime: res[2]});  
        });



            
        });
               
      
        }
        
        var once = setTimeout(refresh,100);
        
        var tweets = setInterval(refresh, 2000);  
        
      
        console.log(":"+onlineCount);  
        //  
        socket.on("disconnect", function() {  
            clearInterval(tweets);
            if(onlineCount > 0 ){  
                //  
                onlineCount--;  
                console.log(":"+onlineCount);  
            }  
        });  
    });  

    


      
    //HTTP3000  
    app.listen(3000, function(){  
        console.log("listening on *:3000");  
    });  
Aug.24,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32b3f-2be30.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32b3f-2be30.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?