Consider a very thin rest layer over S3 , the upload api has a file attachment ( multipart* MIME type ) . The service receives the call and forwards the bytes to S3 .
what are my options to optimize performance here ??
I am thinking zero-copy transfer but in java that seems to be possible only between file <--> socket . What bothers me the is the overhead of the bytes flowing through my jvm where there is no tranformation or value add
EDIT 1: By Performance I primarily mean "fastest way to serve an individual request" , consistent latency ( avoid outliers) will be second in the priority list .