[Need Help] How to properly configure HAProxy with multiple shards

Hi, I am trying to set up multiple jitsi shards on AWS. This is how it looks like
Route53Domain -> ALB (With SSL certificates added provided by ACM) -> HAProxy -> Two Jitsi Shards

Here is my HAProxy Configuration

 frontend http_front
 bind *:80
 stats uri /haproxy?stats
 default_backend http_back

 backend http_back
 balance source
 mode http
 stick-table type string len 256 size 200k expire 120m
 stick on url_param(room)
 server shard1 <Shard1-private-IP>:80 check
 server shard2 <Shard2-private-IP>:80 check

The problem I am facing is, when a user starts a meeting lets say on Shard1

  1. Config is getting loaded from Shard 1 https://<domainname>/<room_name>
  2. Request initiated to <domain>/http-bind?room=<room_name>
  3. Entry is created on HAProxy Stick table with the room name
  4. Conference started

But when Other User try to join the same conference from different shard i.e Shard2

  1. Config is getting loaded from Shard 2 https://<domainname>/<room_name>
  2. The following http-bind request is timing out <domain>/http-bind?room=<room_name> and Audio & Video is not working at all.

But if config is loaded from the same shard it is working fine. Any idea why it happens?

Is there different configs on the different shards? Those should be completely identical.

Yes @damencho, except private IP address, shard name; everything is identical. Here is my config

var config = {
hosts: {
  domain: <PRIVATE IP ADDRESS>',
  muc: 'conference.<!--# echo var="subdomain" default="" --> <PRIVATE IP ADDRESS>'
},
bosh: '/http-bind',
clientNode: 'http://jitsi.org/jitsimeet',
testing: {
  enableFirefoxSimulcast: false,
  p2pTestMode: false,
  octo: {
     probability: 1
  }
},
desktopSharingFrameRate: {
      min: 30,
      max: 60
 },

disableAudioLevels: true,
enableNoAudioDetection: true,
enableNoisyMicDetection: false,
desktopSharingChromeExtId: null,
desktopSharingChromeSources: [ 'screen', 'window', 'tab' ],
desktopSharingChromeMinExtVersion: '0.1',
channelLastN: 12,
useStunTurn: true,
enableWelcomePage: true,
enableLipSync: false,
enableTalkWhileMuted: true,
disableSimulcast: false,
enableLayerSuspension: true,
startAudioMuted: 4,
startWithVideoMuted: false,
startWithAudioMuted: false,
enableUserRolesBasedOnToken: false,
p2p: {
  enabled: false,
  useStunTurn: true,
  stunServers: [
    { urls: 'stun:meet-jit-si-turnrelay.jitsi.net:443' }
  ],
  preferH264: true
},

analytics: {
  googleAnalyticsTrackingId: '',
  // amplitudeAPPKey: '<APP_KEY>'
  scriptURLs: [
        "libs/analytics-ga.min.js", // google-analytics
  ],
},
deploymentInfo: {
 shard: "shard1",
 region: "europe",
 userRegion: '<!--#echo var="http_viewer_continent" default="europe"-->'
},


// List of undocumented settings used in jitsi-meet
/**
 _immediateReloadThreshold
 autoRecord
 autoRecordToken
 debug
 debugAudioLevels
 deploymentInfo
 dialInConfCodeUrl
 dialInNumbersUrl
 dialOutAuthUrl
 dialOutCodesUrl
 disableRemoteControl
 displayJids
 etherpad_base
 externalConnectUrl
 firefox_fake_device
 googleApiApplicationClientID
 iAmRecorder
 iAmSipGateway
 microsoftApiApplicationClientID
 peopleSearchQueryTypes
 peopleSearchUrl
 requireDisplayName
 tokenAuthUrl
 */

// List of undocumented settings used in lib-jitsi-meet
/**
 _peerConnStatusOutOfLastNTimeout
 _peerConnStatusRtcMuteTimeout
 abTesting
 avgRtpStatsN
 callStatsConfIDNamespace
 callStatsCustomScriptUrl
 desktopSharingSources
 disableAEC
 disableAGC
 disableAP
 disableHPF
 disableNS
 enableLipSync
 enableTalkWhileMuted
 forceJVB121Ratio
 hiddenDomain
 ignoreStartMuted
 nick
 startBitrate
 */

  makeJsonParserHappy: 'even if last key had a trailing comma'
 };
  /* eslint-enable no-unused-vars, no-var */

Well that is your problem, that should be the domain you are serving. Check meet.jit.si config, this is the config on all shards.

Yes @damencho, changed IP address to the domain. It is working fine. Thank you.