Evaluating Server-side Swift : A Performance-Focused Web Framework Comparison ; Utvärdering av Swift på Serversidan : En Jämförelse av Webbramverk med Fokus på Prestanda

Saved in:
Bibliographic Details
Title: Evaluating Server-side Swift : A Performance-Focused Web Framework Comparison ; Utvärdering av Swift på Serversidan : En Jämförelse av Webbramverk med Fokus på Prestanda
Authors: Einberg, Isak
Publisher Information: KTH, Skolan för elektroteknik och datavetenskap (EECS)
Publication Year: 2025
Collection: Royal Inst. of Technology, Stockholm (KTH): Publication Database DiVA
Subject Terms: Server-side Swift, Vapor, Ktor, Express.js, Web server framework evaluation, Performance benchmarking, Swift på serversidan, Utvärdering av Webbserverramverk, Prestandatestning, Computer and Information Sciences, Data- och informationsvetenskap
Description: Swift is a modern programming language developed by Apple, predominantly known for its extensive use in client-side applications across Apple’s ecosystem. As Swift expands into the realm of server-side development, it leverages web frameworks to enable developers to efficiently develop web services and APIs. However, a lack of up-to-date performance benchmarks creates uncertainty for its adoption. This thesis addresses this gap by evaluating the performance of Swift’s flagship web framework, Vapor, against two prominent alternatives: Kotlin’s Ktor and JavaScript’s Express. This research is crucial given Swift’s growing server-side support and the significant impact language and framework choices have on application performance and operational costs. A quantitative benchmarking methodology was employed, implementing four distinct workload scenarios (static file serving, JSON processing, database interaction, and CPU-intensive calculation) across all three frameworks. These were deployed as isolated Docker services on identical hardware and load-tested with JMeter, with key metrics such as throughput, latency, and resource utilization systematically recorded. The findings revealed no single universally superior framework, but highlighted distinct performance profiles. Vapor distinguished itself with exceptional memory efficiency and strong performance in CPU- and database-intensive tasks, with zero errors and stable latencies. While Ktor achieved the highest throughput for static content and JSON tasks, it suffered considerable performance issues and errors during database interactions. Express offered balanced performance, but was notably less efficient in CPU-intensive computations and overall memory usage compared to Vapor. This research concludes that Swift’s Vapor is a highly resource-efficient and viable option for server-side development, especially for applications demanding low memory overhead. The empirical data provides a foundation for organizations to make informed decisions regarding technology ...
Document Type: bachelor thesis
File Description: application/pdf
Language: English
Relation: TRITA-EECS-EX; 2025:393
Availability: http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-367785
Rights: info:eu-repo/semantics/openAccess
Accession Number: edsbas.8B238A2
Database: BASE
Be the first to leave a comment!
You must be logged in first