Jee Seok Yoon
Jee Seok Yoon

Reputation: 4806

Amazon EC2 network speed

I am a student who just started using Netty!

I am building a server that communicates with android and iOS. The primary task of my server will be sending and recieving JSON files with images(10 jpegs) and texts(less than 100 character).

My server's framework is Netty.

I built my server from "HttpUploadServer" from the Netty 4.0.6 example jar. As my server's primary task is to upload and download JSON files, I only used multipart POST part from the example.

I built my server to respond with the same file I uploaded. So when I upload(multipart POST request) a 5mb jpeg, the server responds me with the same file.

It takes me about 0.8 ms to upload and recieve 5mb image in localhost. However, it takes me about 10 seconds when I test the server on Amazon EC2 t1.micro.

Is this a normal result for t1.micro? or Am I doing something wrong??

(BTW. I am testing my server with chrome extension called POSTMAN)

Upvotes: 0

Views: 304

Answers (1)

glautrou
glautrou

Reputation: 3198

5MB is huge, 10 seconds is reasonable depending on your broadband.

There is nothing wrong with your code and EC2, your machine (localhost) is faster than a server hosted somewhere in the world.

If you want to reduce the latency your can upload your files asynchronously and/or display the upload progress. There are many easy to use jQuery plugins on the Web (like jQuery File Upload).

Upvotes: 2

Related Questions