Brotli encoding(compression) for LSCache on LSWS/OLS - how enable?

AndreyPopov

Well-Known Member
#1
for one my ticket about use encoding during cache warm up I receive answer:
this is the official clarification from web server team:

When a dynamic page save to lscache.
if it's uncompressed, it will save as is.
When a browser request, it usually has accepted gzip, br, lsws will convert the plain text to gzip, save a gzip copy to lscache, and serve. and original uncompressed copy will be removed. we do not save uncompressed copy in lscache to save space, which has rarely usage.
If it's gzip, it will save as is.
when a browser request, lsws will serve gzip copy directly.
when a client request, only accept deflate, then lsws will dynamically decompress it, and serve the uncompressed copy
if a client only accept br, not gzip, lsws will dynamically convert to br and serve. when request multiple times, lsws will save the generated br copy to lscache, will not save the extra copy when only requested once.

so I think, only there are multiple browser request with only "br" accept coding header will cause lsws generate a br cache copy. since our crawler only request one time, so even with "br" CURLOPT_ENCODING will not generate a br compression cache copy.

by reviews, brotli more faster than gzip and from 14% to 40% better compression (especially for JS/CSS)
brotli supported by all modern browsers
and that's why more interesting this part:
if a client only accept br, not gzip, lsws will dynamically convert to br and serve. when request multiple times, lsws will save the generated br copy to lscache, will not save the extra copy when only requested once.

but my questions about: how many times from "request multiple times" are multiple? after how many only br requests lsws save br copy to lscache?
two? three? five? ten?

still not answered :(

may be anybody know and have statistics about how many only br request need?

P.S.
OLS only do gzip for cache, LSWS can store cache in both gzip and BR when needed, gzip is preferred as all browsers support it.
For ESI, LSWS never create BR copy. for regular cached page, it may create BR copy on the fly when a lot requests want BR.
 
Last edited:

serpent_driver

Well-Known Member
#2
For static sources your server uses br for content-encoding, but this is only related to content-encoding and not for cached files. If I check your response headers your server displays "nginx" and not OLS as server software. Does your host use nginx as proxy in front of your hosting? Maybe this is the reason why your server uses only gzip and not br?

I also miss HTTP/3, so QUIC is also missing?! You have a very strange hosting.... Looks like OLS, but is a OLS fake? ;)
 

AndreyPopov

Well-Known Member
#4
Maybe this is the reason why your server uses only gzip and not br?
you again and again hear only yourself.

I already wrote to you: if NOT use cache then server send br encoding

for example:
never cached https://www.priazha-shop.com/cart

There is no "multiple times". If browser supports br, content-encoding is available with the first request. Where does this statement come from?
may be you CAREFULLY read what about?
read very-very carefully what answer lsws developer!!! read carefully!!!!
again and again: open your eyes and free your mind!
 
Last edited:

serpent_driver

Well-Known Member
#5
Relax yourself :) Nobody wants to take anything away from you or attack you. If I'm speaking here, it's probably because there's no one else. This forum is lonely and poorly supported.

Anyway, let's talk about logic. You complain that your "OLS" server doesn't work as you expect. Have you ever checked your server environment? You don't have:

HTTP/3 -> missing
QUIC -> missing
Server software -> nginx?!
Brotli -> missing
x-turbo-charged-by -> This is no LiteSpeed header
304 status code for cached sources -> missing
x-ray response header -> AWS -> Amazon? mostly used in Ukraine

Maybe I am wrong, but your server can't be in a LiteSpeed environment and this is not native LiteSpeed. It looks like either a CDN or proxy and this environment doesn't support LiteSpeed essential features, so you shouldn't ask LiteSpeed for support, but your host provider what is wrong.

If you don't have much money for hosting, but if you want unlimited LiteSpeed features, check this: https://www.a2hosting.com/web-hosting/compare
 

serpent_driver

Well-Known Member
#8
Do you have a board in front of your head or are you doing it on purpose? I'll show you what's wrong with your hosting and you insult me? What's wrong with you?
 

AndreyPopov

Well-Known Member
#9
@serpent_driver
STOP flooding in thread!

you NOT understanding what about my question!!!! NOT understanding!

stop become cork in any hole.

free your mind and move edges of your understanding

with my hosting all very-very well.

STOP flooding in thread!
 

serpent_driver

Well-Known Member
#10
You are the one who understand complety nothing. You expect a proper working of your OLS, but the environment of your server misses almost everything of OLS and LSWS!
 

AndreyPopov

Well-Known Member
#11
STOP flooding in thread!

only answer for simple-simple-simple question:

WHAT about this thread?
(NOT about hosting environment. with hosting all right!)
 

serpent_driver

Well-Known Member
#14
Stupid question! It doesn't matter if content-encoding is br, gzip or deflate for cached files. Whenever 1 of these 3 kinds of content-encoding compressions is used lscache always compresses dynamic content, but not different depending on br, gzip or deflate. Only if there is no compression or client doesn't support any content-encoding compression lscache stores cached files uncompressed, but next time if another user supports any content-encoding compression lscache makes a compressed copy from uncompressed cached file. That's it! There is no different method for compression of cached files.

But again, you expect brotli compression, but brotli isn't available all the time and not for all requests or sources. This is part of design of LSWS/OLS. For example, again for example, brotli is disabled if ESI is in use. And yes, I know you don't have ESI, but this is only an example. There might be other reasons why brotli doesn't work in your case. And again and again and again, you hosting environement is not native LiteSpeed. Your hosting ist strange, very strange and I believe that this "unnatural" hosting is the reason why you not only get brotli. You should more care about why you don't have HTTP/3 and QUIC. This is the big point if you search for more speed.
 

AndreyPopov

Well-Known Member
#15
There is no different method for compression of cached files.
you carefully read answer from LSWS developers in first post?!!?!?!?!?!?!?!?!?!?
carefully?
or may be you begin tell to developers "how LSWS works"?

if you REALLY WANT TO HELP - stop flooding about hosting
open your eyes, free your mind and break edges of your knowledges
and read again THIS:
if a client only accept br, not gzip, lsws will dynamically convert to br and serve. when request multiple times, lsws will save the generated br copy to lscache, will not save the extra copy when only requested once.
these are NOT my words. these from developers.

I only ask HOW made that lsws will save the generated br copy to lscache
 

serpent_driver

Well-Known Member
#16
I only ask HOW made that lsws will save the generated br copy to lscache
How? Simple answer, request a page with a client that supports any encoding compression. What is the problem? You can test it by your own. Use curl and set custom "Accept-Encoding: gzip,deflate,br" header and make a another curl request with "Accept-Encoding: identity" header. Check cached file and you see the difference.

And again, your hosting is bullshit.
 

AndreyPopov

Well-Known Member
#17
How? Simple answer, request a page with a client that supports any encoding compression. What is the problem? You can test it by your own. Use curl and set custom "Accept-Encoding: gzip,deflate,br" header and make a another curl request with "Accept-Encoding: identity" header. Check cached file and you see the difference.
you cannot read carefully :(
only hear yourself.
bla-bla-bla-bla - any help! only bla-bla-bla about yourself

if you really want to help, carefully read answer, think and answer:

HOW made that lsws will save the generated br copy to lscache


P.S. gzip copy already saved.
 

serpent_driver

Well-Known Member
#18
I already understand you right, but you either don't or you can't read?! There is no br, gzip or deflate depending compression for cached files. This is not because I could believe it. It is because I got this information from Big Boss of LiteSpeed. Do you think I'm just making up clever answers?

Did I already asked you when you will change your hosting to get the real speed of LiteSpeed? ;)

Btw. Your english is horrible! Please use Google translator or any other translator.
 

AndreyPopov

Well-Known Member
#19
I already understand you right
really?

There is no br, gzip or deflate depending compression for cached files.
you tell about different thing that I ask.

I not ask how client accept enconding.

I ask: HOW made that lsws will save the generated br copy to lscache
homy many times "br only" client must send request that lsws will save brotli encoded page to cache?
P.S. and Big Boss says that lsws CAN save page in cache in br compression.
 
Last edited:
Top