Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


NgineX Brotly + Cloudflare brotly Yes or NO ?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

NgineX Brotly + Cloudflare brotly Yes or NO ?

-->If i am using Nginx and cloudflare , do i need to activate the brotly at server level . I mean brotly would transfer to cloudflare zipped through Brotly where CF is going to unzip it and transfer it afterwards as brotly as well . Or the cloudflare is going to send the same brotly so it could be beneficial ? (1)
--> The speed would be the same ( if cloudflare unzip brotly +pack it after that) ? (2)
--> Which is the performance at server level for brotly usage vs gzip usage ? It matters and is cost effective ? Which is your opinion ? (3)

Which is your opinion and experiences with it ? What are you using?
  1. NGINx brotli+CF brotli7 votes
    1. NGINx+CF brotli
      42.86%
    2. NGINX gzip+CF brotly
      28.57%
    3. Another configuration
      28.57%

Comments

  • nobody ? :(

  • jsgjsg Member, Resident Benchmarker

    If you have a modern server, well compressable content (e.g. HTML and not videos) and not a huge pipe (10+Gb/s) using good compression will always offer the best trade off.

    This is even more true when considering that usually in hosting egress traffic is charged and one of the main cost factors. At the same time e.g. Brotli compression on a modern processor and a typical pipe (1-4 Gb/s) is very cheap.

    Thanked by 1Chievo
  • @jsg said:
    If you have a modern server, well compressable content (e.g. HTML and not videos) and not a huge pipe (10+Gb/s) using good compression will always offer the best trade off.

    This is even more true when considering that usually in hosting egress traffic is charged and one of the main cost factors. At the same time e.g. Brotli compression on a modern processor and a typical pipe (1-4 Gb/s) is very cheap.

    Sure but you charge CPU and right now the TB is cheaper than the CPU . I have not measure it to be honest , but may be some user has done it or someone could have an approximate idea if this could be cost effective . ( or it would save time to cloudflare to give them compressed brotli package --> Speed consideration ) .

  • If you care about performance, you can use precompressed files: you'd have to compress those once manually. http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html

    Seems like CF do their own compression and won't serve your assets even if you brotli compress them: https://community.centminmod.com/threads/nginx-with-cloudflare-zlib-fork-vs-nxg_brotli-compression-level-tests.13820/ so they'd spend some cpu cycles to decompress your assets before compressing again. Your best bet is probably to do your own tests and see what performs better!

  • Doesn't matter the gain is not between cloudflare and your server, that is low latency with fast speed. The only part where brotli is a benefit is on slow connections and that is between cloudflare and your visitor. So as long as there is brotli on, everything is fine.

  • jsgjsg Member, Resident Benchmarker
    edited September 2018

    @Chievo said:
    ... right now the TB is cheaper than the CPU ...

    No, it isn't IF we are talking about modern processors and typical dedi or VPS bandwidth. Then compression is all but neglegible.

    As to your "here or at Cloud$"%§&?" question: YOUR interest is to have your response packets compressed. For CF that's somewhat of a nuisance but (a) they are supposed to serve your interests and not the other way around and (b) they deserve pain anyway.

    But you should also look at what @datanoise said (although the question whether CF also compresses your response packets is quite probably none of your major concerns).

  • jsgjsg Member, Resident Benchmarker

    @user54321 said:
    Doesn't matter the gain is not between cloudflare and your server, that is low latency with fast speed. The only part where brotli is a benefit is on slow connections and that is between cloudflare and your visitor. So as long as there is brotli on, everything is fine.

    That's wrong or only very partially true. Among other relevant factors Brotli compression adds no significant amount of latency. We're talking microseconds vs tens of milliseconds here which is a factor of tens of thousands.

  • @jsg said:

    @Chievo said:
    ... right now the TB is cheaper than the CPU ...

    No, it isn't IF we are talking about modern processors and typical dedi or VPS bandwidth. Then compression is all but neglegible.

    As to your "here or at Cloud$"%§&?" question: YOUR interest is to have your response packets compressed. For CF that's somewhat of a nuisance but (a) they are supposed to serve your interests and not the other way around and (b) they deserve pain anyway.

    But you should also look at what @datanoise said (although the question whether CF also compresses your response packets is quite probably none of your major concerns).

    Colocation machines .
    Well technically speaking the brotly could save 12% of time but at which cost ? CPU , the main question is someone know if it is going to be cost effective . Obviously , i understand your point of view and you are right . But if use my cpu ( money+time ) to compress it and after that at CF level is decompressed and compressed ( more time than just compress ) well i am not quiet sure which situation would be more beneficial for me to be really honest to you . I mean more cpu usage , more money and probably lower performance . At least this is my conception of the things .

  • @datanoise said:
    If you care about performance, you can use precompressed files: you'd have to compress those once manually. http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html

    Seems like CF do their own compression and won't serve your assets even if you brotli compress them: https://community.centminmod.com/threads/nginx-with-cloudflare-zlib-fork-vs-nxg_brotli-compression-level-tests.13820/ so they'd spend some cpu cycles to decompress your assets before compressing again. Your best bet is probably to do your own tests and see what performs better!

    Sure checking it is the very best way to see how is going to work in your own scenario . I was curious to have some ¨suggestions¨or another benchmarks that i could use in order to compare . the behaviour of my stats agains their and looking for a correlation between them ,etc.

  • jsgjsg Member, Resident Benchmarker

    @Chievo

    What's your priority? Latency? Saving costs? Time to paint? ... ?

    Everything is a trade off. If you know your priority and if you are willing to actually get (or listen to) practical experience and knowledge you can find your sweet spot.

    As for CF, whatever they do is not of concern in that equation because the difference between a full Brotli decompression and compression cycle, a single compression or neither of both is insignificant in the big picture. Again: some microseconds don't change the full picture (ten of milliseconds, maybe more) not perceivably.

    I'm out. I wanted to help but I'm not interested in evangelizing. Whatever you do, may it be the right thing for you.

    Thanked by 2Chievo datanoise
  • ChievoChievo Member
    edited September 2018

    duplicated comment , sorry

  • @jsg said:
    @Chievo

    What's your priority? Latency? Saving costs? Time to paint? ... ?

    Everything is a trade off. If you know your priority and if you are willing to actually get (or listen to) practical experience and knowledge you can find your sweet spot.

    As for CF, whatever they do is not of concern in that equation because the difference between a full Brotli decompression and compression cycle, a single compression or neither of both is insignificant in the big picture. Again: some microseconds don't change the full picture (ten of milliseconds, maybe more) not perceivably.

    I'm out. I wanted to help but I'm not interested in evangelizing. Whatever you do, may it be the right thing for you.

    Firstly , thank you for the dedicated time . In any case i respect your opinion and i am completely agree that you are right . The main question or at least my idea was to understand if cloudflare is doind decompress/compress of brotli . If i have this information i could act in consequence . Like what you have said , there are lot of points of view . In my case , speed is a paramount . Cost is secondary . But if Cloudflare would do decompress/compress i am going to pay more money ( CPU usage ) and lose performance . I listen to anybody . Yes it would not change my performance drastically . For sure , but any ms is important and every dollar in your pocket matters as well . ( at least this is my point of view ) Well , unfortunately we are in 2018 and every ms matters if you are in a really competitive niche and if you have shop etc . I mean , every ms saved is something nice and you are up front to the rest of competitors . Small details matters . This is my way to do the things . You could say that i am wrong or not . I am not here to say i am right or wrong ....just asking if cloudflare is compressing decompressing or just using your compressed brotly , that s all. In any way , thank you for your opinion and your comments . I respect your decision . In any case . Have a nice day ! Kind regards!

  • They likely decompress/compress.

    If you want to save cpu cycles, have your gzip already compressed on your server using ngx_http_gzip_static_module: it won't cost your money (cpu) and you'll save time and bandwidth.

    Thanked by 1Chievo
  • @datanoise said:
    They likely decompress/compress.

    If you want to save cpu cycles, have your gzip already compressed on your server using ngx_http_gzip_static_module: it won't cost your money (cpu) and you'll save time and bandwidth.

    thank you ! Yes i have seen the stats there and seems that they are doing it at their own . I have seen that they are using a different level of brotli as well so it is even more quiet probably that they do it . Thank you for your help @Datanoise ! Have a nice day ! Thanks for your time Kind regards!

  • @Chievo said:
    Sure but you charge CPU and right now the TB is cheaper than the CPU .

    why you need compression then ? it's CF that retrieve data from your server (nginx), not your client (visitor).

Sign In or Register to comment.