Redis API Questions

Discussion in 'A-Parser Support Forum' started by scrapefun, Sep 9, 2025 at 9:51 PM.

  1. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    205
    Likes Received:
    36
    A few questions about the Redis API:

    1) When setting threads using {num:1:150}, and I have a config preset for 150 threads set for the task, does Redis API use the preset's settings? or does it use the default settings for the threads presets?

    2) How do retries work? I have a Google preset I use with Redis API set to 25 retries, and the redis preset also set to 25 retries? Does the Redis preset override the retries of the Google preset?

    3) Any optimizations tips for getting the most speed? I'm using Kvrocks. Also I have multiple instances of A-parser running on the same server (Kvrocks a separate server)
     
  2. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    4,764
    Likes Received:
    2,213
    The Documentation contains information about which parameters are used from where:
    • all settings, except for useproxy, proxyChecker, and proxybannedcleanup are taken from the preset of the called scraper + overrideOpts
    • settings useproxy, proxyChecker, and proxybannedcleanup are taken from the preset API::Server::Redis API::Server::Redis + overrideOpts
    The task with API::Server::Redis API::Server::Redis will be launched in 150 threads, the rest of the parameters will be used according to the information above.

    According to the information above, the request retries parameter (proxyretries) will be taken from the preset of the called scraper.

    There are no special tips or recommendations. You should experiment and monitor the server load based on your tasks. If you have multiple instances of A-Parser, you can process queries from a single queue using the same Redis Queue Key.
     
  3. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    205
    Likes Received:
    36
    Thanks for the reply. Still not clear on one thing.

    When I set the thread count using: {num:1:150}

    Does it use the default settings for threads?

    threads_default.png



    If so, how can I change the default settings? Specifically, "Reuse proxy between retries":

    150_threads.png
    Would I use the configPreset parameter so the options I want for threads are used?

    config_preset.png
     
  4. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    4,764
    Likes Received:
    2,213
    This is just a quick way to set the number of queries equal to the number of threads. In API::Server::Redis API::Server::Redis, each thread waits indefinitely for tasks to appear in the Redis queue. So you need to run it this way.

    The task with API::Server::Redis API::Server::Redis uses the threads config that you have selected. Accordingly, you need to select the threads config with the settings you need (having previously created it).

    No, this parameter is not supported in queries via the Redis API.
     
    scrapefun likes this.
  5. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    205
    Likes Received:
    36
    Thanks, this helped a lot.
     
    Support likes this.

Share This Page