Swift at Apple: Migrating the Password Monitoring service from Java
Swift is heavily used in production for building cloud services at Apple, with incredible results. Last year, the Password Monitoring service was rewritten in Swift, handling multiple billions of requests per day from devices all over the world. In comparison with the previous Java service, the updated backend delivers a 40% increase in performance, along with improved scalability, security, and availability.
→ swift.org/blog/swift-at-apple-migrating-the-password-monitoring-service-from-java/
The Password Monitoring service for Apple’s Passwords app, introduced in 2024, was rewritten from Java to Swift, achieving a 40% performance increase, better scalability, and lower resource usage.
Previously built on Python 2 and Google App Engine, the Java-based service faced slow response times and high memory demands, prompting a full rewrite using Swift’s Vapor framework, leveraging its protocols, async/await, and safety features like optionals.
The Swift version reduced the codebase by 85%, improved latency to under 1 ms for 99.9% of requests, and cut memory usage significantly, running efficiently on Kubernetes with 50% less capacity.
Custom Swift packages for cryptography and middleware, combined with a robust ecosystem, supported the rewrite, demonstrating Swift’s suitability for high-performance, privacy-preserving cloud services.
Category:
Tag:
Year: