Skip to content

Instantly share code, notes, and snippets.

@yottta
Last active March 27, 2019 09:16
Show Gist options
  • Save yottta/0644c3e79416a22703bcab59937401e5 to your computer and use it in GitHub Desktop.
Save yottta/0644c3e79416a22703bcab59937401e5 to your computer and use it in GitHub Desktop.
Medium article about WebSockets throughout Varnish - user.vcl 1
vcl 4.1;
backend default {
.host = "web-client";
.port = "80";
}
backend productService {
.host = "product-service";
.port = "8080";
}
sub vcl_recv {
if (req.url == "/product" || req.url == "/ws") {
set req.backend_hint = productService;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment