Series 1: Performance Engineering Interview Questions

In this series we will see the interview questions that can be asked related to external connectivity.

How will you find number of connections established with your Databases or SOR or any external services)?

There is a Unix/Windows command “netstat” which displays all the network connections originating from the current server. Issue this command and grep for the host that you are interested to find out established connections.

Example: Assuming you are connecting to an external Services provider whose IP address is “108.251.22.21” then unix command will be:

netstat -an | grep "108.251.22.21" | grep "ESTABLISHED" | wc -l

How will you figure out at real-time whether response time is degrading with your Databases or SOR or any external services)?

There are couple of mechanisms to figure it out:

  1. There are APM (Application Performance Monitoring) tools such as NewRelic, AppDynamics, Wily Introscope…. which can report at real-time whether response time is degrading or not.
  1. If you don’t APM You can instrument application level logging for each external services. So from application logs also response time can be reported.

Approach #1 is better, because in approach #2 you will have to login to each production server to compute the average time across all transactions – its slow process. It’s also hard to see the historic average response time.

interview

How will you diagnose the problem if response time has degraded with your external services?

  1. I will check whether any recent changes were made to the application in production. Changes could be:
  • New Code Deployment
  • OS patches, Kernel Setting changes
  • Network/Firewall settings changes
  • Installation of any monitoring tools/agents in the production environment
  • JVM setting changes…
  1. I will take thread dump on the application and analyze them to see whether there are any thread related locking/waiting is happening.
  1. If no changes has been made on our side, then I will confirm with external services provider whether any changes has been made on them.
  1. If there are no problem with the external service provider as well, then problem could be in the environment or Network. I will reach out to my cloud service provider (if you are hosting the application in the public cloud). If application is hosted in the enterprises private data center, I will reach out to them.
  1. I will instrument packet capture to understand whether there are any problems in the network connectivity.

How will you capture thread dumps? How will you analyze them?

I will use the tools such as JStack, VisualVM to capture thread dumps. For more detail on how to capture thread dumps please refer to this article.

I will use the tool http://fastthread.io/ to analyze the threading problems. This tool applies several patterns and identifies the problems in the thread dumps, without any human analysis.

What tools are used to do analyze network issues?

  1. Wireshark is a *great* network protocol analyzer for Unix and Windows. It’s a free tool. It can be used for capturing data at packet level and analyze them.
  2. Traceroute traceroute is a computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network. It gives information such as number of hops it takes to reach between your server and the destination. Amount of time spent in each hop. For more details on how to use Traceroute refer to this blog.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: