2

I have two Java applications deployed on tomcat. For inter application communication I provide jar file of application (Java API) to other application and it becomes a method call which is fast.

Now I am thinking of creating rest service, can it add some extra time. Of course yes but how much in worst case. Keeping in mind applications are on intranet.

How can I measure network latency? which I think will be most time taking part.

Need expert advice/opinion, how can we take design decisions in such cases?

5
  • Why down vote? Is it not correct forum to ask such questions? If it is not i am ready to remove this question, please suggest.
    – Vipin
    Apr 30, 2016 at 6:29
  • it is not correct forum, you're right. See help center, section "not about..."
    – gnat
    Apr 30, 2016 at 6:36
  • @gnat i gone through what it is not section. I am not asking how to use any tool. My question is around design decision, if there is any tool which can help to take such decision. And moreover asking experts if how do they take design decisions in such cases.
    – Vipin
    Apr 30, 2016 at 6:41
  • "Is there any tool available to measure network latency?" -- this is asking to recommend a tool
    – gnat
    Apr 30, 2016 at 6:52
  • 1
    Thanks for pointing out the problem. I have updated question now. I need recommendations in design decision.
    – Vipin
    Apr 30, 2016 at 6:57

1 Answer 1

1

TL;DR latency is unpredicatable in general.

Start with investigating worst case. If REST host goes down, a call will only return after TCP timeout (configurable, defaults can reach 10 minutes).

To prevent this ensure, you have adequate timeouts set on client's side and be ready to handle failures.

Latency also depends on distance, hardware, software and payload.

Hardware, OS and distance delays can be measured by simple ping command, but web server and TCP connection usually introduce additional drastic delay which sometimes depends on payload too (static resources, for example, are easier to handle).

You can try various techniques to measure latency of mocked web-server, but be aware, that it will change significantly when you introduce your actual business logic.

To answer your question, there are plenty of services out in the web which measure your site's performance, but you will have to use them each time you change business logic.

1
  • ping responds within .225 millisecond, payload is also less than 1kb. To measure performance i use jmeter, but not sure if it has any option to provide network latency as well. What else can i use to measure latency?
    – Vipin
    Apr 30, 2016 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.