Mitigating WireGuard VPN Latency Overhead on Sequential ORM Queries Using Redis Caching

Authors

  • Juri Pebrianto UIN Syarif Hidayatullah
  • Ridhwan Dery Iradat UIN Syarif Hidayatullah

DOI:

https://doi.org/10.35194/mji.v18i1.6441

Keywords:

Object-Relational Mapping , WireGuard VPN, In-Memory Database , Network Latency , Performance Optimization

Abstract

The transition to distributed cloud architectures relies heavily on Virtual Private Networks (VPNs) like WireGuard for secure communication, and Object-Relational Mapping (ORM) frameworks for rapid application development. However, the sequential query generation (N+1 query problem) inherent in ORMs creates a severe latency bottleneck when traversing encrypted network tunnels. Objective: This study aims to quantitatively evaluate the performance degradation caused by WireGuard VPN latency on ORM-driven relational databases and measure the effectiveness of Redis in-memory caching as an architectural mitigation strategy. Methods: A quantitative experimental approach was conducted using a containerized multi-VM topology to isolate environment variables. We compared the execution latency of PostgreSQL and Redis under a local baseline scenario against a remote WireGuard VPN environment, utilizing mathematical modeling to analyze the bottleneck shift from disk I/O to network Round Trip Time (RTT). Results: Experimental results reveal that PostgreSQL latency spiked exponentially by 52,400% (from 0.04 ms to 21.00 ms) when forced through the VPN due to accumulated RTT. Conversely, implementing Redis caching bypassed the synchronous relational overhead, restricting the latency spike to 5,860% (13.13 ms) and yielding a 1.43x system speedup. In a simulated extreme N+1 scenario (500 sequential queries), Redis caching saved approximately 4 seconds of execution time. Conclusion: Shifting the computational load from relational disk to asynchronous memory is not merely an optional performance enhancement but an architectural necessity for ORM-based applications deployed over encrypted networks. Future research should explore AI-driven automated caching strategies to address dynamic workloads.

Author Biography

Juri Pebrianto, UIN Syarif Hidayatullah

Dosen Universitas Pamulang Fakultas Teknik Program Studi Teknik Ilmu Komputer dan sebagai Programmer Backend, Mobile serta Networking

References

[1] H. Muhamad and M. Taha, "Optimizing the performance of web applications in dynamic network environment: A systematic and comprehensive analytical survey," 3 2026.

[2] Z. Zhang, A. Megargel, and L. Jiang, "Performance evaluation of newsql databases in a distributed architecture," IEEE Access, vol. 13, pp. 11 185-11 194, 2025.

[3] S. Troia, L. Borgianni, G. Sguotti, S. Giordano, and G. Maier, "A comprehensive survey on software-defined wide area network," IEEE Communications Surveys and Tutorials, vol. 28, pp. 2805-2845, 2026.

[4] F. Freitas, A. Ferreira, and J. Cunha, "A methodology for refactoring orm-based monolithic web applications into microservices," Journal of Computer Languages, vol. 75, 6 2023.

[5] M. Pantelelis and C. Kalloniatis, "Mapping crud to events - towards an object to event-sourcing framework," in ACM International Conference Proceeding Series. Association for Computing Machinery, 11 2022, pp. 285-289.

[6] J. C. Yusmita, R. Arya, J. M. Wijaya, K. M. Suryaningrum, and R. R. Siswanto, "Optimizing database access strategy: A performance analysis comparison of raw sql and prisma orm," in Procedia Computer Science, vol. 269. Elsevier B.V., 2025, pp. 1201-1210.

[7] P. Krishnan, K. Jain, A. Aldweesh, P. Prabu, and R. Buyya, "Openstackdp: a scalable network security framework for sdn-based openstack cloud infrastructure," Journal of Cloud Computing, vol. 12, 12 2023.

[8] E. F. Kfoury, S. Choueiri, A. Mazloum, A. Alsabeh, J. Gomez, and J. Crichigno, "A compre-hensive survey on smartnics: Architectures, development models, applications, and research directions," IEEE Access, vol. 12, pp. 107 297-107 336, 2024.

[9] M. Ali, F. Naeem, G. Kaddoum, and E. Hossain, "Metaverse communications, networking, security, and applications: Research issues, state-of-the-art, and future directions," IEEE Communications Surveys and Tutorials, vol. 26, pp. 1238-1278, 2024.

[10] P. P. Ray, "A survey on model context protocol: Architecture, state-of-the-art, challenges and future directions," 4 2025. [Online]. Available: https://www.techrxiv.org/doi/full/10.36227/ techrxiv.174495492.22752319/v1

[11] Dittrich, J. (2025). How to get Rid of SQL, Relational Algebra, the Relational Model, ERM, and ORMs in a Single Paper--A Thought Experiment. arXiv preprint arXiv:2504.12953.

[12] L. K. Ram, D. Saha, S. Chakraborty, and A. Gupta, "Beyond the handshake: Eliminating fallback latency from quic-to-tcp transitions," in Proceedings of the ACM CoNEXT Workshop. Association for Computing Machinery (ACM), 1 2026, pp. 132-137.

[13] S. Ferreira, J. Mendonca, B. Nogueira, W. Tiengo, and E. Andrade, "Benchmarking consistency levels of cloud-distributed nosql databases using ycsb," IEEE Access, vol. 13, pp. 63 428-63 438, 2025.

[14] W. Smith, Singlestore Database in Practice: The Complete Guide for Developers and Engineers. HiTeX Press, 2025.

[15] R. K. Veerapaneni, R. Delhibabu, A. Subbotin, and N. Zhukova, "Development of a high-performance in-memory database architecture for intelligent video surveillance in critical patient care," Frontiers in Digital Health, vol. 8, 5 2026. [Online]. Available: https://www.frontiersin.org/articles/10.3389/fdgth.2026.1807507/full

[16] B. Bicski and A. Pekar, "Unveiling latency-induced service degradation: A methodological approach with dataset," IEEE Access, vol. 12, pp. 128 097-128 116, 2024.

[17] B. Romanous, S. Windh, I. Absalyamov, P. Budhkar, R. Halstead, W. Najjar, and V. Tsotras, "Efficient local locking for massively multithreaded in-memory hash-based operators," VLDB Journal, vol. 30, pp. 333-359, 5 2021.

[18] Y. Zhu, T. Xia, T. Zhu, Z. Zhao, K. Li, and X. Hu, "Rapo: An automated performance optimization tool for redis clusters in distributed storage metadata management," IEEE Access, vol. 13, pp. 58 060-58 074, 2025.

[19] S. K. Shivakumar and S. Sethii, DXP Performance Optimization. Apress, 2019, pp. 235-259. [Online]. Available: https://doi.org/10.1007/978-1-4842-4303-9_9

[20] Þórarinsson, S., Jónsson, B. Þ., & Khan, O. S. (2026, June). Optimization of Long-Running Media Aggregation Queries. In Proceedings of the 2026 International Conference on Multimedia Retrieval (pp. 1778-1786).Available: https://dl.acm.org/doi/10.1145/3805622.3810667

[21] D. Satriani, E. Veltri, D. Santoro, S. Rosato, S. Varriale, and P. Papotti, "Logical and physical optimizations for sql query execution over large language models," Proceedings of the ACM on Management of Data, vol. 3, pp. 1-28, 6 2025.

[22] Güvercin, A. E., & Avenoglu, B. (2022). Performance Analysis of Object-Relational Mapping (ORM) Tools in. Net 6 Environment. Bilişim Teknolojileri Dergisi, 15 (4), 453-465.

[23] J. Dittrich, "How to get rid of sql, relational algebra, the relational model, erm, and orms in a single paper - a thought experiment," 4 2025. [Online]. Available: http://arxiv.org/abs/2504.12953

[24] W. Liu and T. H. Chen, "Slocator: Localizing the origin of sql queries in database-backed web applications," IEEE Transactions on Software Engineering, vol. 49, pp. 3376-3390, 6 2023.

[25] M. R. Hasan, M. R. Hasan, and H. Bagheri, "Unlocking optimal orm database designs: Acceler-ated tradeoff analysis with transformers," Proceedings of the ACM on Software Engineering, vol. 2, pp. 1639-1662, 6 2025.

[26] E. Sierra and U. L. Yuhana, "Optimizing software development through data access speed using object-relational mapping (orm) on credit risk application," in Proceedings of the 3rd 2023 International Conference on Smart Cities, Automation and Intelligent Computing Systems, ICON-SONICS 2023. Institute of Electrical and Electronics Engineers Inc., 2023, pp. 201-206.

[27] A. Vikiru, M. Muiruri, and I. Ateya, "An overview on cloud distributed databases for business environments," 1 2023. [Online]. Available: http://arxiv.org/abs/2301.10673

[28] L. Rosa, L. Foschini, and A. Corradi, "Empowering cloud computing with network acceleration: A survey," IEEE Communications Surveys and Tutorials, vol. 26, pp. 2729-2768, 2024.

[29] K. S. Shim, B. Greskamp, B. Towles, B. Edwards, J. P. Grossman, and D. E. Shaw, "The specialized high-performance network on anton 3," in Proceedings - International Symposium on High-Performance Computer Architecture, vol. 2022-April. IEEE Computer Society, 2022, pp. 1211-1223.

[30] Saugata, G.-L. Juan, A. R. M. Onur, and Ghose, A Modern Primer on Processing in Memory. Springer Nature Singapore, 2023, pp. 171-243. [Online]. Available: https://doi.org/10.1007/978-981-16-7487-7_7

[31] R. Wang, J. Wang, S. Idreos, M. T. Özsu, and W. G. Aref, "The case for distributed shared-memory databases with rdma-enabled memory disaggregation," arXiv preprint arXiv:2207.03027, 2022.

[32] K. Huang, T. Wang, Q. Zhou, and Q. Meng, "The art of latency hiding in modern database engines," in Proceedings of the VLDB Endowment, vol. 17. VLDB Endowment, 2023, pp. 577-590.

[33] Chango, W., Salguero, A., Ortíz, L., & Chavarrea, R. (2025, June). Comparative Performance of MongoDB and Redis in Microservices-Based Web Applications: NoSQL Databases Selection. In 2025 IEEE Technology and Engineering Management Society (TEMSCON LATAM) (pp. 1-6). IEEE.

[34] Y. Xu, P. He, X. Zhang, and H. Hu, "Research and implementation of redis-based data hot-table caching mode," in 2025 4th International Symposium on Computer Applications and Information Technology, ISCAIT 2025. Institute of Electrical and Electronics Engineers Inc., 2025, pp. 2172-2175.

[35] Y. Tang, P. Li, and Y. Cao, "High-concurrency data service model based on mysql, redis, and mycat," in 2025 10th International Conference on Electronic Technology and Information Science, ICETIS 2025. Institute of Electrical and Electronics Engineers Inc., 2025, pp. 412-415.

[36] D. Almeida, M. Lopes, L. Saraiva, M. Abbasi, P. Martins, J. Silva, and P. V√°z, "Performance comparison of redis, memcached, mysql, and postgresql: A study on key-value and relational databases," in 2023 2nd International Conference on Smart Technologies for Smart Nation, SmartTechCon 2023. Institute of Electrical and Electronics Engineers Inc., 2023, pp. 902-907.

[37] A. Tezuysal and I. Ahmed, Database Design and Modeling with PostgreSQL and MySQL: Build efficient and scalable databases for modern applications using open source databases. Packt Publishing Ltd, 2024.

Downloads

Published

2026-06-28

How to Cite

Pebrianto, J., & Dery Iradat , R. (2026). Mitigating WireGuard VPN Latency Overhead on Sequential ORM Queries Using Redis Caching. Media Jurnal Informatika, 18(1), 115–125. https://doi.org/10.35194/mji.v18i1.6441

Similar Articles

1 2 3 > >> 

You may also start an advanced similarity search for this article.