---
title: "[Xray Server] Automation and creating Test Executions on Xray using Rest API response times are very slow"
canonical: "https://docs.getxray.app/space/ProductKB/46268956/%5BXray%20Server%5D%20Automation%20and%20creating%20Test%20Executions%20on%20Xray%20using%20Rest%20API%20response%20times%20are%20very%20slow"
format: markdown
---
## Problem

Sometimes Jira instances are cross-borders and the validation of a user is done in a server far from request origin.


For instance, let's say a user from Israel is trying to import results, one by one, thus re-authenticating at each request.

Jira is connected to two Active Directory servers: one local, and one based in the U.S.

The order of our user directories is configured as follows:  
1. U.S based Active Directory  
2. Local Active Directory  
3. Jira internal

Each request will have an extra latency due to the authentication being done in a distant server.


## There are 2 solutions:

1 - Group Xray requests similar request into one, thus having only one connection to authenticate


2 - Change order of authentication. In this specific example, it would look like

Changing the order to the following:  
1. Jira internal  
2. Local Active Directory  
3. U.S based Active directory