Forum Discussion

Chris_Phillips's avatar
Chris_Phillips
Icon for Nimbostratus rankNimbostratus
Jul 04, 2014

Where is a large HTTP POST buffered to in an LTM / ASM system?

Hi,

 

If I look to upload a 50mb document through an ASM enabled httpclass, I see all 50mb enter the box (tcpdump / chrome developer tools). I see nothing at all come out to a pool member. the ASM policy then throws an exception for exceeding the maximum buffer size. Where has this data been buffered too then? Is it still in LTM? I don't think it's in ASM, is it somehow in neither and this is a base level TMOS thing instead? Seeing this first hand I can presume that it does make sense that the HTTP REQUEST must complete before an HTTP RESPONSE can be sent, so what's going on? Typing this right now, is LTM just throwing it all to /dev/null until it stops? what if it never stops? What if i'm being given a 10Gb file? How does ASM apply the check for exceeding the buffer size and when?

 

I was under the impression that ASM has a 4k buffer by default meaning that each 4k that passes through ASM will be passed onto a pool member. As such, the back end app has the opportunity to validate data, in this current case, a basic length check, and reply sooner than ASM does if the application's own length check is breached before a larger one set on ASM. e.g. ASM allows a 6mb upload, the app only allows 5mb so a 7mb upload will exceed 5mb first and the application can catch it and return a much more integrated and polite error message and ASM would only kick in if the app somehow fails. This appears to not be how things actually work after all.

 

And tagging one last thing on, if I disable the "Request length exceeds defined buffer size" violation I see no violations being raised against an illegal POST size.

 

As always seems to be the way, the documentation doesn't appear to reflect reality as I think I perceive it!

 

Thanks

 

Chris

 

4 Replies

  • Hi,

     

    There is some restriction for file upload through webapp protected by ASM.

     

    As far as I remember you can extend the buffer capabilities to 30Mb max.

     

    I suggest to disable ASM for your Virtual Server when POST multi-part is detected and Content-Length header value exceed 30Mb.

     

    BR

     

    Yann

     

    • Chris_Phillips's avatar
      Chris_Phillips
      Icon for Nimbostratus rankNimbostratus
      It's 20mb on 10.2.4, and I'm expecting to have to do something along these lines, but I'm currently looking to clarify what's going on in this situation.
  • Hi,

     

    There is some restriction for file upload through webapp protected by ASM.

     

    As far as I remember you can extend the buffer capabilities to 30Mb max.

     

    I suggest to disable ASM for your Virtual Server when POST multi-part is detected and Content-Length header value exceed 30Mb.

     

    BR

     

    Yann

     

    • Chris_Phillips's avatar
      Chris_Phillips
      Icon for Nimbostratus rankNimbostratus
      It's 20mb on 10.2.4, and I'm expecting to have to do something along these lines, but I'm currently looking to clarify what's going on in this situation.