Slide 19
Slide 19 text
Finally,
buffers
One
of
the
most
important
things
you
need
to
tweak
is
the
buffer
sizes
you
allow
Nginx
to
use.
If
the
buffer
sizes
are
set
too
low
Nginx
will
have
to
store
the
responses
from
upstreams
in
a
temporary
file
which
causes
both
write
and
read
IO,
the
more
traffic
you
get
the
more
of
a
problem
this
becomes.
client_body_buffer_size
is
the
direcEve
which
handles
the
client
request
buffer
size,
meaning
the
incoming
request
body.
This
is
used
to
handle
POST
data,
meaning
form
submissions,
file
uploads
etc.
You’ll
want
to
make
sure
that
the
buffer
is
large
enough
if
you
handle
a
lot
of
large
POST
data
submissions.
fastcgi_buffers
and
proxy_buffers
are
the
direcEves
which
deal
with
the
response
from
your
upstream,
meaning
PHP,
Apache
or
whatever
you
use.
The
concept
is
exactly
the
same
as
above,
if
the
buffers
aren’t
large
enough
the
data
will
be
saved
to
disk
before
being
served
to
the
user.
NoEce
that
there
is
an
upper
limit
for
what
Nginx
will
buffer,
even
on
disk,
before
it
transfer
it
synchronously
to
the
client.
This
limit
is
governed
by
fastcgi_max_temp_file_size
as
well
as
proxy_max_temp_file_size.
In
addiEon
you
can
also
turn
it
off
enErely
for
proxy
connecEons
with
proxy_buffering
set
to
off.
(Usually
not
a
good
idea!)