Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
5ff084c4
Commit
5ff084c4
authored
Aug 02, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs
parent
7bd45f21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
26 deletions
+82
-26
README.rst
README.rst
+41
-13
vdp_pesi.vcc
src/vdp_pesi.vcc
+41
-13
No files found.
README.rst
View file @
5ff084c4
...
...
@@ -90,6 +90,16 @@ error.
because the ESI level 0 thread can send available data to the client
concurrently to other parallel ESI threads.
Serial mode may sensibly be used to reduce overhead and the number
of threads required without relevant drawbacks
- at esi_level > 0
- when the vcl author knows that all objects included by the current
request will be cacheable and thus highly likely cause cache hits.
Also see the discussion below for more detail.
* ``thread``, requires *bool* argument
Whether we always request a new thread for includes, default is
...
...
@@ -113,24 +123,42 @@ error.
the client concurrently. As soon as ESI object processing is
complete, the respective thread will be returned to the thread pool
and become available for any other varnish task (except for the
request for esi_level 0, which will wait for completion of the
entire ESI request, sending data to the client in parallel).
request for esi_level 0, which _has_ to wait for completion of the
entire ESI request anyway and will send data to the client in the
meantime).
With this setting to ``true`` (the default), this is what happens
always, but a thread
for processing of includes may not be
immediately available and thus may have to wait if the thread pool
i
s not sufficiently large
.
always, but a thread
may not be immediately available if the thread
pool is not sufficiently sized for the current load and thus the
i
nclude request may have to be queued
.
With this setting to ``false``, include processing happens in the
same thread as if ``serial`` mode had been activated, but only in
the case when there is no new thread available. While this may sound
like the more sensible option at first, we did not make this the
default for two reasons:
- except for ESI level 0, the current thread will become available
as soon as ESI processing has completed
*XXX slink to continue*
the case where there is no new thread available. While this may
sound like the more sensible option at first, we did not make this
the default for the following reasons:
- Before completion of the ESI processing, the subtree below it is
not yet available for delivery to the client because additional
VDPs behind pesi cannot be called from a different thread.
- While processing of the include may take an arbitrarily long time
(for example because it requires a lengthy backend fetch), we know
that the ESI object is fully available in the stevedore (and
usually in memory already) when we parse an include because
streaming is not supported for ESI. So we know that completing the
processing of the current ESI object will be quick, while
descending into a subtree may be take a long time.
- Except for ESI level 0, the current thread will become available
as soon as ESI processing has completed.
- The thread herder may breed new threads and other threads may
terminate, so queuing a thread momentarily is not a bad thing per
se.
In short, keeping ``thread`` at the default ``true`` should be the
right option, the alternative exists just in case.
.. _vmod_pesi.version:
...
...
src/vdp_pesi.vcc
View file @
5ff084c4
...
...
@@ -76,6 +76,16 @@ error.
because the ESI level 0 thread can send available data to the client
concurrently to other parallel ESI threads.
Serial mode may sensibly be used to reduce overhead and the number
of threads required without relevant drawbacks
- at esi_level > 0
- when the vcl author knows that all objects included by the current
request will be cacheable and thus highly likely cause cache hits.
Also see the discussion below for more detail.
* ``thread``, requires *bool* argument
Whether we always request a new thread for includes, default is
...
...
@@ -99,24 +109,42 @@ error.
the client concurrently. As soon as ESI object processing is
complete, the respective thread will be returned to the thread pool
and become available for any other varnish task (except for the
request for esi_level 0, which will wait for completion of the
entire ESI request, sending data to the client in parallel).
request for esi_level 0, which _has_ to wait for completion of the
entire ESI request anyway and will send data to the client in the
meantime).
With this setting to ``true`` (the default), this is what happens
always, but a thread
for processing of includes may not be
immediately available and thus may have to wait if the thread pool
i
s not sufficiently large
.
always, but a thread
may not be immediately available if the thread
pool is not sufficiently sized for the current load and thus the
i
nclude request may have to be queued
.
With this setting to ``false``, include processing happens in the
same thread as if ``serial`` mode had been activated, but only in
the case when there is no new thread available. While this may sound
like the more sensible option at first, we did not make this the
default for two reasons:
- except for ESI level 0, the current thread will become available
as soon as ESI processing has completed
*XXX slink to continue*
the case where there is no new thread available. While this may
sound like the more sensible option at first, we did not make this
the default for the following reasons:
- Before completion of the ESI processing, the subtree below it is
not yet available for delivery to the client because additional
VDPs behind pesi cannot be called from a different thread.
- While processing of the include may take an arbitrarily long time
(for example because it requires a lengthy backend fetch), we know
that the ESI object is fully available in the stevedore (and
usually in memory already) when we parse an include because
streaming is not supported for ESI. So we know that completing the
processing of the current ESI object will be quick, while
descending into a subtree may be take a long time.
- Except for ESI level 0, the current thread will become available
as soon as ESI processing has completed.
- The thread herder may breed new threads and other threads may
terminate, so queuing a thread momentarily is not a bad thing per
se.
In short, keeping ``thread`` at the default ``true`` should be the
right option, the alternative exists just in case.
$Function STRING version()
...
...
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