Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-cluster
Commits
a1aa7632
Commit
a1aa7632
authored
May 23, 2018
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to VRT_DirectorResolve
parent
0965a167
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
23 deletions
+5
-23
README.rst
README.rst
+3
-1
vmod_cluster.c
src/vmod_cluster.c
+2
-22
No files found.
README.rst
View file @
a1aa7632
...
...
@@ -2,4 +2,6 @@ working POC for a director to facilitate cache-clustering.
This is work in progress.
As of 2018-05-09, needs master.patch applied to varnish-cache master
As of 2018-05-23, this vmod requires branch VRT_DirectorResolve from
git@github.com:nigoroll/varnish-cache.git - see also
https://github.com/varnishcache/varnish-cache/pull/2680
src/vmod_cluster.c
View file @
a1aa7632
...
...
@@ -314,42 +314,22 @@ VCL_VOID vmod_cluster_uncacheable_direct(VRT_CTX,
pl
->
uncacheable_direct
=
direct
;
}
// XXX
#define VDI_HACK 1
static
VCL_BACKEND
cluster_resolve
(
VRT_CTX
,
const
struct
vmod_cluster_cluster_param
*
pr
)
{
VCL_BACKEND
obe
,
r
;
#ifdef VDI_HACK
struct
busyobj
dummy
[
1
];
struct
vrt_ctx
cctx
[
1
];
#endif
VCL_BACKEND
r
;
if
(
pr
->
uncacheable_direct
&&
ctx
->
bo
&&
(
ctx
->
bo
->
do_pass
||
ctx
->
bo
->
uncacheable
))
return
(
pr
->
real
);
#ifdef VDI_HACK
if
(
ctx
->
bo
==
NULL
)
{
INIT_OBJ
(
dummy
,
BUSYOBJ_MAGIC
);
memcpy
(
cctx
,
ctx
,
sizeof
*
ctx
);
cctx
->
bo
=
dummy
;
ctx
=
cctx
;
}
#endif
obe
=
VRT_r_bereq_backend
(
ctx
);
AN
(
pr
->
cluster
);
VRT_l_bereq_backend
(
ctx
,
pr
->
cluster
);
r
=
VDI_Resolve
(
ctx
);
r
=
VRT_DirectorResolve
(
ctx
,
pr
->
cluster
);
if
(
cluster_blacklisted
(
pr
,
r
))
r
=
pr
->
real
;
VRT_l_bereq_backend
(
ctx
,
obe
);
return
(
r
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment