Zend Server Best Practices > Performance > Optimizing Job Queue Performance

Optimizing Job Queue Performance

All data sent as parameters to a job has to be stored and then fetched from the Job Queue database. Since this process is both costly in terms of performance, and inefficient in clustered environments, it is highly recommended to avoid sending large-sized data to a job. Instead, we recommend saving the data as a file, or saving it is a file and making it available via a URL.

Note:

Parameters sent to a job cannot exceed the size defined in the 'zend_jobqueue.max_message_size' directive which has a maximum size limit of 64KB.

If the enqueing and executing servers reside on the same machine:

 

 

Instructions on how to complete a procedure

  1. Save the data on the file system.
  2. Pass a parameter with the name and location of the temporary file to the Job Queue database.

 

 

If the enqueing and executing servers reside on different machines:

 

 

Instructions on how to complete a procedure

  1. Save the data on the enqueing server's file system.
  2. Enable access to the file using Web services (for fetching and erasing the data).

 

 

 

 

Read Also

  Zend Server Best Practices    
  Performance    
  Zend Job Queue