You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have profiled Kafka Rest v7.5.0 under some test load (2rps on Produce V2 endpoint with Avro format and schemas registered in Schema Registry, using schema id) and it looks like most of the time inside RecordSerializerFacade.serialize is actually spent reinstantiating the three serializers (Avro, JsonSchema, Protobuf) (you can see how small is the portion spent actually serializing in this profiling).
It seems this is due to io/confluent/kafka/serializers/AbstractKafkaSchemaSerDe.addRuleObjectsFromServiceLoader.
Am I interpreting this right? Are serializers reinstantiated for each request?
Would it be possible to reuse the same serializers for different requests? Are they thread-safe? If yes, can we maybe bind SchemaRecordSerializerFactory with singleton scope?
Thank you!
The text was updated successfully, but these errors were encountered:
Hi!
I have profiled Kafka Rest v7.5.0 under some test load (2rps on Produce V2 endpoint with Avro format and schemas registered in Schema Registry, using schema id) and it looks like most of the time inside
RecordSerializerFacade.serialize
is actually spent reinstantiating the three serializers (Avro, JsonSchema, Protobuf) (you can see how small is the portion spent actually serializing in this profiling).It seems this is due to
io/confluent/kafka/serializers/AbstractKafkaSchemaSerDe.addRuleObjectsFromServiceLoader
.SchemaRecordSerializerFactory
with singleton scope?Thank you!
The text was updated successfully, but these errors were encountered: