We are leaving Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Sending Images within Jobs

Hello,

I would like to send photos (JPEG) by Http requests made in Hangfire Jobs and I don’t know if it’s a good idea knowing that Hangfire will serialize the body of the http request in an Oracle database (including the image) and the requests will be up to ten per second.

Has anyone ever tried this? Is there any performance impact to Hangfire please?

Thanks.

Per Hangfire documentation it is recommended to pass as little info to the job as possible. For example, instead of passing an entity, pass the Id of the entity.

I have a similar situation for sending notifications (emails). The notification may involve a lot of data so it is serialized to S3 and I send the resulting object key to Hangfire. Within the job it reads the object from S3 and deserializes it.

I can’t say what kind of impact storing images as parameters to a Hangfire job will have but I would expect it to be high. It can also depend on the average size/maximum size of an image.

1 Like