Performance Analysis and Refactoring of the Synapse Reference Server through Observability

  • Francisco A. A. Gomes UFC
  • Francisco A. Silva UFPI
  • Michel Sales UFC
  • Windson Viana UFC
  • Fernando A. M. Trinta UFC
  • Rossana M. de C. Andrade UFC
  • José A. F. de Macêdo UFC
  • Vinícius Lagrota CEPESC
  • Rodrigo Pacheco CEPESC
  • Paulo A. L. Rego UFC

Resumo


The Matrix protocol is a leading solution for decentralized, real-time communication, with Synapse as its primary reference server. Despite its wide adoption, systematic performance evaluations leveraging observability have been limited. This study instruments Synapse with distributed tracing, metrics collection, and network traffic analysis to characterize endpoint usage, identify bottlenecks, and guide architectural optimization. Our analysis revealed that synchronization, database contention, and lock management are the primary sources of latency, particularly around the /sync and message dispatch endpoints. Guided by observability insights, we applied targeted refactoring, including cache resizing, workload redistribution to specialized workers, baremetal deployment, PostgreSQL tuning, and connection pooling. These interventions transformed Synapse into a highly scalable system, increasing throughput from 11 to 405 requests per second and reducing average response time from 4755 ms to 92 ms. The results demonstrate that observability not only diagnoses performance issues but can directly inform refactoring strategies to achieve substantial operational gains in complex, distributed communication platforms.

Referências

Albrecht, M. R., Celi, S., Dowling, B., and Jones, D. (2023). Practically-exploitable cryptographic vulnerabilities in matrix. In 2023 IEEE Symposium on Security and Privacy (SP), pages 164–181. IEEE.

Albrecht, M. R., Dowling, B., and Jones, D. (2024). Device-oriented group messaging: a formal cryptographic analysis of matrix’core. In 2024 IEEE Symposium on Security and Privacy (SP), pages 2666–1685. IEEE.

Bilyatdinov, K., Kiselev, S., and Petukhova, A. (2026). Information security model for messengers based on matrix protocol. International Journal of Open Information Technologies, 14(1):102–108.

Dragoni, N., Giallorenzo, S., Lafuente, A. L., Mazzara, M., Montesi, F., Mustafin, R., and Safina, L. (2017). Microservices: yesterday, today, and tomorrow. Present and ulterior software engineering, pages 195–216.

Jacob, F., Beer, C., Henze, N., and Hartenstein, H. (2021). Analysis of the matrix event graph replicated data type. IEEE access, 9:28317–28333.

Jacob, F., Grashöfer, J., and Hartenstein, H. (2019). A glimpse of the matrix (extended version): Scalability issues of a new message-oriented data synchronization middleware. arXiv preprint arXiv:1910.06295.

Karumuri, S., Solleza, F., Zdonik, S., and Tatbul, N. (2021). Towards observability data management at scale. ACM SIGMOD Record, 49(4):18–23.

Kosińska, J., Baliś, B., Konieczny, M., Malawski, M., and Zielinśki, S. (2023). Towards the observability of cloud-native applications: The overview of the state-of-the-art. IEEE Access.

Li, B., Peng, X., Xiang, Q., Wang, H., Xie, T., Sun, J., and Liu, X. (2022). Enjoy your observability: an industrial survey of microservice tracing and analysis. Empirical Software Engineering, 27:1–28.

Li, H., Wu, Y., Huang, R., Mi, X., Hu, C., and Guo, S. (2023). Demystifying decentralized matrix communication network: Ecosystem and security. In 2023 IEEE 29th International Conference on Parallel and Distributed Systems (ICPADS), pages 260–267. IEEE.

Martins, J. A., Rego, P. A., de Macêdo, J. A., Silva, F. A., and Lagrota, V. (2026). Matrix protocol: a comprehensive systematic mapping study. Journal of Cloud Computing, 15(1):20.

Martins, J. A. P., Rego, P. A. L., Macêdo, J. A. F. d., Andrade, R. M. C., Bonfim, M. S., Ivo, R. F., Costa, V. L. R. d., Pacheco, R. P., and Silva, F. A. P. d. (2025). Protocolo matrix: Conceitos, arquitetura, aplicações e desafios. In Jornada de Atualização em Informática 2025. SBC, Porto Alegre, RS, Brasil.

Müller, M., Lee, J.-U., Frick, N., Stangier, L., Gurevych, I., and Metternich, J. (2021). Extracting problem related entities from production chats to enhance the data base for assistance functions on the shop floor. Procedia CIRP, 103:231–236.

Riutort Grande, P. (2021). How p2p framework can help mitigate trust and security risks of iot applications. Procedia CIRP.

Usman, M., Ferlin, S., Brunstrom, A., and Taheri, J. (2022). A survey on observability of distributed edge ”&” container-based microservices. IEEE Access, 10:86904–86919.
Publicado
25/05/2026
GOMES, Francisco A. A. et al. Performance Analysis and Refactoring of the Synapse Reference Server through Observability. In: SIMPÓSIO BRASILEIRO DE REDES DE COMPUTADORES E SISTEMAS DISTRIBUÍDOS (SBRC), 44. , 2026, Praia do Forte/BA. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 1122-1135. ISSN 2177-9384. DOI: https://doi.org/10.5753/sbrc.2026.19566.

Artigos mais lidos do(s) mesmo(s) autor(es)

1 2 3 4 5 6 7 > >>