• Resolved zebrastribe2

    (@zebrastribe2)


    Hi
    According to my hosting company (WP engine) they see a high use from this path:
    /wp-json/wordpress-popular-posts/v1/popular-posts

    Is it from your plugin and if so how can I limit it?
    Can be it be cached or made could there be made a transients function to avoid it being call some many times?

    BR,
    Jesper

    • This topic was modified 2 years, 8 months ago by zebrastribe2.
    • This topic was modified 2 years, 8 months ago by zebrastribe2.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @zebrastribe2,

    That’s one of WPP’s REST API endpoints, yes.

    As for how to limit its usage, well, there’s honestly not a lot you can do about it. The endpoint has two different usages:

    • For GET requests that endpoint returns a list of your current popular posts (see /popular-posts). If you’re getting high usage of this endpoint and these are GET requests then it means something (a bot?) is hitting that endpoint to possibly crawl/index your popular posts data. The plugin has no way to “limit” how third-party actors use the endpoint (this would be something that WordPress itself would need to implement).
    • For POST requests that endpoint saves views data into your database: when someone visits your posts and pages this is the URL the plugin uses to save views count. You can’t “limit” access to this endpoint either but you can reduce performance impact by either caching your pageviews or by using the Data Sampling feature.
    Thread Starter zebrastribe2

    (@zebrastribe2)

    Hi Héctor
    Thank you for your reply. I have activated the both data caching and data sampling now and hope it can help a bit.

    BR,
    Jesper

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Spikes in requests’ is closed to new replies.