skip to Main Content

I have had trouble implementing SignalR Microservices when using a KrakenD API Gateway.
I presume it is possible as I have had it working with both an NGINX Load Balancer and an Emissary API Gateway respectively.

KrakenD, to my current understanding, seems a lot faster then both protocols. So it should be better to handle large amounts of real time data.

If anyone has any advice, has done this before or could supply me with an example krakend.json configuration example that would be much appreciated.
i.e. my current one below:

{
  "version": 2,
  "extra_config": {},
  "timeout": "3000ms",
  "cache_ttl": "300s",
  "output_encoding": "json",
  "name": "KrakenGateway",
  "port": 8080,
  "endpoints": [
    {
      "endpoint": "/foohubname",
      "backend": [
        {
          "url_pattern": "/ws",
          "disable_host_sanitize": true,
          "host": [ "ws://signalrservicename:80/foohubname" ]
        }
      ],
      "extra_config":{
        "github.com/devopsfaith/krakend-websocket": {
            "headers_to_pass":["Cookie"],
            "connect_event": true,
            "disconnect_event": true
        }
      }
    }
  ]
}

Have a great day,
Matt

2

Answers


  1. Chosen as BEST ANSWER

    Ended up using the Emisarry Gateway for now, will re-valuate speeds ect when I get closer to production and testing


  2. The WebSockets functionality is an enterprise function: https://www.krakend.io/docs/enterprise/websockets/

    If you place an Enterprise-only configuration in a community edition binary won’t have any effect.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search