Skip to main content
Version: 12.x (Current)

Requests and limits

This section provides a brief overview of the service performance and recommendations about CPU and RAM requests and limits in order to reach optimal performances on common scenarios.

Results have been obtained through specific tests implementing a series of requests to the Appointment Manager Service.

Specifically, the following APIs have been tested to measure CPU and RAM usage when dynamically computing slots:

  • GET /calendar/count: return the number of events for all resources in a given period;
  • GET /calendar/: return the events (availabilities with slots, exceptions and appointments) for all resources in a given period;
  • GET /slots/: return the slots for a resource in a given period.

We designed the tests so that, following our suggested requests and limits, you can serve more users by simply scaling the service horizontally, i.e. increasing the number of replicas proportionally to the expected traffic.

Scenarios

The performance of the Appointment Manager, and the aforementioned endpoints in particular, depend on the following variables:

  • the period: we simulated a client fetching calendar events for a single day, week or month;
  • the number of resources: we simulated a client fetching events for 5 or 25 resources;
  • the availability frequency and duration: we simulated a daily availability from 7:00 to midnight for each resource;
  • the slot duration: we simulated slots having a fixed duration of 15 minutes in the first test suite and flexible duration (15, 30 and 60 minutes) in the second.

Variable resources

In the first test suite we focus on how the number of resources affects the performance.

The following table summarizes our findings:

UsersResourcesDaily slotsWeekly slotsMonthly slotsRequests Per SecondCPU RequestsCPU LimitsMemory RequestsMemory Limits
1534023801054012501000100250
5534023801054032501000100250
5534023801054035001500100250
10534023801054065001500100250
20534023801054085001500100250
1251700119005270015001500100250
52517001190052700<15001500100250

We recommend starting with a single replica configured as follows:

  • CPU request: 500 Mi
  • CPU limit: 1500 Mi
  • RAM request: 100 m
  • RAM limit: 250 m

and adding more replicas as needed according to the number of users and resources.

Variable slots

In the next test suites we focus on how the number of slots affects the performance, averaging the number of resources to ten in all test cases.

15 minutes

UsersResourcesDaily slotsWeekly slotsMonthly slotsRequests Per SecondCPU RequestsCPU LimitsMemory RequestsMemory Limits
11068047602108012501000100200
51068047602108042501000100200
101068047602108062501000100200
201068047602108062501000100200
501068047602108062501000100200

30 minutes

UsersResourcesDaily slotsWeekly slotsMonthly slotsRequests Per SecondCPU RequestsCPU LimitsMemory RequestsMemory Limits
11034023801054012501000100200
51034023801054042501000100200
101034023801054062501000100200
201034023801054082501000100200
501034023801054052501000100200

60 minutes

UsersResourcesDaily slotsWeekly slotsMonthly slotsRequests Per SecondCPU RequestsCPU LimitsMemory RequestsMemory Limits
1101701190527012501000100200
5101701190527042501000100200
10101701190527062501000100200
20101701190527082501000100200
50101701190527082501000100200

Variable CPU requests and limits

For the third test suite, we scaled up and down the microservice CPU requests and limits to assess the minimum CPU requirements.

UsersResourcesDaily slotsWeekly slotsMonthly slotsRequests Per SecondAverage response time (ms)90%ile (ms)CPU RequestsCPU LimitsMemory RequestsMemory LimitsWarnings
5106804760210803330970500100050150None
5106804760210803721190025050050150None
51068047602108021431370020040050150CPU throttling, <1% failures
51068047602108011635360015030050150Pod restart, CPU throttling, 1% failures

The following table provides some recommendations, based on the results of the load tests. We suggest you start with the best matching configuration, according to the number of expected simultaneous users. The single user configuration represents the minimum requirements, according to our internal tests. You can easily start from any of the following configurations and then fine tune it according to your specific needs.

Number of concurrent usersCPU RequestsCPU LimitsMemory RequestsMemory Limits
Single user5010050100
2-5 users25050050100
5-15 users5001000100150
20+ users10001500100150