Skip to content

Commit

Permalink
Merge pull request #111 from medizininformatik-initiative/110-increas…
Browse files Browse the repository at this point in the history
…e-flare-default-query-timeout-to-5-minutes

Increase client default query timeout to 5 minutes
  • Loading branch information
EmteZogaf authored Apr 12, 2024
2 parents 072d643 + 8d261a2 commit 4480701
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 deletions.
50 changes: 25 additions & 25 deletions mii-process-feasibility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,31 +104,31 @@ Besides the [common DSF settings controlled by different environment variables][

**All of them share the same prefix `DE_MEDIZININFORMATIK_INITIATIVE_FEASIBILITY_DSF_PROCESS_`:**

| EnvVar | Description | Default |
|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| CLIENT_STORE_PROXY_HOST | Forward proxy host. | `null` |
| CLIENT_STORE_PROXY_PORT | Forward proxy port. | `` |
| CLIENT_STORE_PROXY_USERNAME | Username for a forward proxy if it requires one. | `null` |
| CLIENT_STORE_PROXY_PASSWORD | Password for a forward proxy if it requires one. | `null` |
| CLIENT_STORE_AUTH_BEARER_TOKEN | Bearer token used for authentication against a client target. Do not prefix this with `Bearer `! | `null` |
| CLIENT_STORE_AUTH_BASIC_USERNAME | Username for basic authentication against a FHIR server client target. | `null` |
| CLIENT_STORE_AUTH_BASIC_PASSWORD | Password for basic authentication against a FHIR server client target. | `null` |
| CLIENT_STORE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FHIR server client target in `ms`. | `2000` |
| CLIENT_STORE_TIMEOUT_CONNECT_REQUEST | Timeout for requesting a connection to a FHIR server client target in `ms`. | `20000` |
| CLIENT_STORE_TIMEOUT_SOCKET | Timeout for blocking a read / write network operation to a FHIR server without failing in `ms`. | `20000` |
| CLIENT_STORE_TRUST_STORE_PATH | Path to a trust store used for connecting to a FHIR server. Necessary when using self-signed certificates. | `null` |
| CLIENT_STORE_TRUST_STORE_PASSWORD | Password for opening the trust store used for connecting to a FHIR server. | `null` |
| CLIENT_STORE_KEY_STORE_PATH | Path to a key store used for authenticating against a FHIR server or proxy using a client certificate. | `null` |
| CLIENT_STORE_KEY_STORE_PASSWORD | Password for opening the key store used for authenticating against a FHIR server or proxy. | `null` |
| CLIENT_STORE_BASE_URL | Base URL to a FHIR server or proxy for feasibility evaluation. This can also be the base URL of a reverse proxy if used. Only required if evaluation strategy is set to `cql`. | `` |
| CLIENT_FLARE_BASE_URL | Base URL to a FLARE instance. Only required if evaluation strategy is set to `structured-query`. | `` |
| CLIENT_FLARE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FLARE client target in `ms`. | `2000` |
| EVALUATION_STRATEGY | Defines whether the feasibility shall be evaluated using `cql` or `structured-query`. Using the latter requires a FLARE instance. | `cql` |
| EVALUATION_OBFUSCATE | Defines whether the feasibility evaluation result shall be obfuscated. | `true` |
| EVALUATION_OBFUSCATION_SENSITIVITY | Sets the sensitivity of the Laplace distribution function used for obfuscating the result. | `1.0` |
| EVALUATION_OBFUSCATION_EPSILON | Sets the epsilon value of the Laplace distribution function used for obfuscating the result. | `0.5` |
| RATE_LIMIT_COUNT | Sets the hard limit for the maximum allowed number of requests during the configured rate limit interval after no further requests will be processed | `999` |
| RATE_LIMIT_INTERVAL_DURATION | Sets the size of the time window used for calculating the request rate. The value is required to be given in the [ISO 8601 format][10] (e.g. "PT1H30M10S"). | `PT1H` |
| EnvVar | Description | Default |
|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| CLIENT_STORE_PROXY_HOST | Forward proxy host. | `null` |
| CLIENT_STORE_PROXY_PORT | Forward proxy port. | `` |
| CLIENT_STORE_PROXY_USERNAME | Username for a forward proxy if it requires one. | `null` |
| CLIENT_STORE_PROXY_PASSWORD | Password for a forward proxy if it requires one. | `null` |
| CLIENT_STORE_AUTH_BEARER_TOKEN | Bearer token used for authentication against a client target. Do not prefix this with `Bearer `! | `null` |
| CLIENT_STORE_AUTH_BASIC_USERNAME | Username for basic authentication against a FHIR server client target. | `null` |
| CLIENT_STORE_AUTH_BASIC_PASSWORD | Password for basic authentication against a FHIR server client target. | `null` |
| CLIENT_STORE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FHIR server client target in `ms`. | `2000` |
| CLIENT_STORE_TIMEOUT_CONNECT_REQUEST | Timeout for requesting a connection to a FHIR server client target in `ms`. | `20000` |
| CLIENT_STORE_TIMEOUT_SOCKET | Timeout for blocking a read / write network operation to a FHIR server without failing in `ms`. | `300000` |
| CLIENT_STORE_TRUST_STORE_PATH | Path to a trust store used for connecting to a FHIR server. Necessary when using self-signed certificates. | `null` |
| CLIENT_STORE_TRUST_STORE_PASSWORD | Password for opening the trust store used for connecting to a FHIR server. | `null` |
| CLIENT_STORE_KEY_STORE_PATH | Path to a key store used for authenticating against a FHIR server or proxy using a client certificate. | `null` |
| CLIENT_STORE_KEY_STORE_PASSWORD | Password for opening the key store used for authenticating against a FHIR server or proxy. | `null` |
| CLIENT_STORE_BASE_URL | Base URL to a FHIR server or proxy for feasibility evaluation. This can also be the base URL of a reverse proxy if used. Only required if evaluation strategy is set to `cql`. | `` |
| CLIENT_FLARE_BASE_URL | Base URL to a FLARE instance. Only required if evaluation strategy is set to `structured-query`. | `` |
| CLIENT_FLARE_TIMEOUT_CONNECT | Timeout for establishing a connection to a FLARE client target in `ms`. | `300000` |
| EVALUATION_STRATEGY | Defines whether the feasibility shall be evaluated using `cql` or `structured-query`. Using the latter requires a FLARE instance. | `cql` |
| EVALUATION_OBFUSCATE | Defines whether the feasibility evaluation result shall be obfuscated. | `true` |
| EVALUATION_OBFUSCATION_SENSITIVITY | Sets the sensitivity of the Laplace distribution function used for obfuscating the result. | `1.0` |
| EVALUATION_OBFUSCATION_EPSILON | Sets the epsilon value of the Laplace distribution function used for obfuscating the result. | `0.5` |
| RATE_LIMIT_COUNT | Sets the hard limit for the maximum allowed number of requests during the configured rate limit interval after no further requests will be processed | `999` |
| RATE_LIMIT_INTERVAL_DURATION | Sets the size of the time window used for calculating the request rate. The value is required to be given in the [ISO 8601 format][10] (e.g. "PT1H30M10S"). | `PT1H` |

## Compatibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import static ca.uhn.fhir.rest.api.Constants.HEADER_AUTHORIZATION;
import static ca.uhn.fhir.rest.api.Constants.HEADER_AUTHORIZATION_VALPREFIX_BEARER;
import static com.google.common.base.Strings.isNullOrEmpty;
import static de.medizininformatik_initiative.process.feasibility.variables.ConstantsFeasibility.CLIENT_TIMEOUT_DEFAULT;
import static java.lang.String.format;

@Configuration
Expand All @@ -46,7 +47,7 @@ public class FlareWebserviceClientSpringConfig {
@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.flare.base_url:}")
private String flareBaseUrl;

@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.flare.timeout.connect:2000}")
@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.flare.timeout.connect:" + CLIENT_TIMEOUT_DEFAULT + "}")
private int connectTimeout;

@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.proxy.host:#{null}}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import javax.net.ssl.SSLContext;

import static de.medizininformatik_initiative.process.feasibility.variables.ConstantsFeasibility.CLIENT_TIMEOUT_DEFAULT;

@Configuration
@Import(BaseConfig.class)
public class StoreClientSpringConfig {
Expand Down Expand Up @@ -46,7 +48,7 @@ public class StoreClientSpringConfig {
@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.timeout.connect_request:20000}")
private Integer connectRequestTimeout;

@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.timeout.socket:20000}")
@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.timeout.socket:" + CLIENT_TIMEOUT_DEFAULT + "}")
private Integer socketTimeout;

@Value("${de.medizininformatik_initiative.feasibility_dsf_process.client.store.base_url:}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ public interface ConstantsFeasibility {

Date MEASURE_REPORT_PERIOD_START = new LocalDate(1900, 1, 1).toDate();
Date MEASURE_REPORT_PERIOD_END = new LocalDate(2100, 1, 1).toDate();

int CLIENT_TIMEOUT_DEFAULT = 300000;
}

0 comments on commit 4480701

Please sign in to comment.