apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

Dashboard: Break single ElasticSearch query to multiple queries #3071

Closed bajiat closed 6 years ago

bajiat commented 7 years ago

User story

As an API owner or administrator, I do not want to wait for the entire page to load before I can see any data on the dashboard Details view.

Description

In the current Details view implementation, a single ElasticSearch query for the selected timeframe. This means that data for all charts and figures needs to be returned before anything gets shown on the dashboard. Hence with APIs with large amount of calls, users might be looking at the spinner for 30s.

Goal

Single ES query is broken into multiple queries, perhaps query per chart.

marla-singer commented 7 years ago

Probably solution

  1. Overview charts

    • Separate reques to get data for chart and another request to get data about total numbers (sum requests, general medial time and unique users number)
    • Make it reusable for Dashboard page
  2. Response status codes

    • Make a separate request
    • Think about make it reusable for Dashboard page
  3. Charts "API Request Timeline" and "API Response time"

    • Make a separate request
  4. Table "Errors statistic"

    • Make a separate request
    • Order by data on the server side
  5. Table "Most frequent users"

    • Make a separate request
    • Order by calls on the server side

Nice to have:

bajiat commented 6 years ago

@marla-singer and @55 Can you look at the spinner design together?

Nazarah commented 6 years ago

@bajiat @55 I had proposed an custom APInf spinner idea in this issue #3030 Could you consider this for our APInf instance?