# API Scaling Testing ### API Configuration - Configure Credentials API to run 10 processes in a container using nginx - Configure Wallet API to run 10 processes in a container using nginx - Configure Provider API to run 5 processes in a container using nginx ### Test Scenarios - Scenario 1: No App Service Plan scaling, single VM - Scenario 2: Fixed App Service Plan scaling, 5 VMs ### Test Endpoints All endpoints used in testing should not include calling external agents, like sending credential to connection, etc. All tests must include single endpoint, not a combination of multiple. Each endpoint is associated with a single test. - Credentials API - Create **connectionless** credential offer (`connectionId: null`)(https://docs.trinsic.id/reference#createcredential) - Create connectionless verification from policy (https://docs.trinsic.id/reference#createverificationfrompolicy) - Wallet API - Create new wallet (https://docs.trinsic.id/reference#createwallet) - Get a single record (Connection, Credential, etc) (https://docs.trinsic.id/reference#getcredential-1) - List all credentials for verification (https://docs.trinsic.id/reference#getavailablecredentialsforverification) ### Test Theories Run each test for 2 min using Load configuration. Max acceptable avg response time is 3 sec. Data to capture for each run: - Endpoint - Scale Out used (Scenario 1 vs 2) - VUs - Average Response Time, - Average Requests per Seconds #### Test Runs - Credential API - Scenario 1 (capture RPMs and avg response for each endpoint) - 20 VUs - All endpoints - 50 VUs *(or other number that makes sense for that endpoint based on previous runs)* - All endpoints - Gradually increase VUs count by 20 until avg response time exceeds max acceptable response time - Scenario 2 (same as above) - Wallet API - Scenario 1 (same as above) - Scenario 2 (same as above) ## Results If possible, please monitor and capture the CPU and Memory load of the Azure VMs. Feel free to add any relevant metrics not captured here. #### Credential API | Endpoint | Scale Out (1 or 5) | VUs | Avg response time | Avg req per sec | CPU load | Memory Load| | ---------------- | ------------------ | --- |------------------ | ----------------|----------|------------| | Credential Offer |1|20| | | | Credential Offer |1|50| | | | Credential Offer |5|20| | | | Credential Offer |5|50| | |