Is it better to have multiple sockets for multiple tabs or just one socket saved in the DB for a chat implmentation with socket.io,redux-socket.io?

Solution for Is it better to have multiple sockets for multiple tabs or just one socket saved in the DB for a chat implmentation with socket.io,redux-socket.io?
is Given Below:

we are implmenting a private messenging feature on our website, we are using socket.io and redux-socket.io middleware to dispatch actions directly to the server. so far in our implmentation whenever a user logs in or opens a tab while logged he gets a socket for each tab he opens and we are saving these sockets on the server in an object that contains fields with the user_id containing an array of sockets that belong to that user.the sockets gets deleted if the user closes the tabs and if he closes everytab the field gets deleted from the js object connected_users.
this the code on the server.js file

let connected_users = {};
const addUser = (userId, socketId) => {

  Object.keys(connected_users).some((user) => user === userId) ?
  connected_users[userId] = [...connected_users[userId], socketId ] :
  connected_users[userId] = [socketId]
  console.log(connected_users)
};

const removeUser = (socket) => {
  try {
    connected_users[socket.userid] = connected_users[socket.userid].filter((socketid) => socketid != socket.id);
    connected_users[socket.userid].length == 0 &&
    delete connected_users[socket.userid]
  }
  catch (error) {
    console.log(error)
  }

};

my question is whether its better to implment it this way with multiple sockets for each user(a socket for every different tab) or would be better to save the socket in the user document on the DB and create API calls to manipulate it , get it from the server or delete it on disconnect.