Home > other >  Netty cluster how to share the Channel
Netty cluster how to share the Channel

Time:12-27



Business code would only write four years of development, the distributed high concurrency also can't be a programmer? ->>


Bosses, please help to solve a technical problem, the project USES netty as server access Gps hardware devices, Gps through TCP protocol and server to send data, sent a total of two kinds of inclusions: send in package tells the service end device id, after it has been send to locate package, no longer carry device id (TCP request is long connection), under the single instance service, this kind of circumstance I use netty generated channelID and device id into the cache, this sends orientation package can query the device id, but I worry about cluster circumstance has a problem, because the hardware load likely will be the same TCP link to another instance, could not find the corresponding relationship of the cache, because channelID is netty generated, in one instance id is bound to change, after how to deal with, wait for bosses analysis, urgently, online etc.!

CodePudding user response:


Hardware load device should be able to change package, increase content of the package, I used to have before layer 7 switches can be
When you will pick you up to new socket, generate an id, then add the id in the package, to the backend devices

CodePudding user response:


Now that is a long connection, why the same connection will be forwarded to other instances?

CodePudding user response:


Don't want to software level, the channel is with the network card binding, even share the meaningless,
  • Related