braintree / braintree_android

Braintree SDK for Android
https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
MIT License
407 stars 233 forks source link

[V4] Use TLS 1.3 #1030

Closed scannillo closed 3 months ago

scannillo commented 4 months ago

Background

Total time spent on GW networking is a top concern recently.

Our SDK is using HTTP 1.1 and TLS 1.2, while the latest available are HTTP 2 and TLS 1.3. I conducted the below timing analysis to see where we would benefit from updating to the latest versions of these protocols.

Local Testing

I used this script to execute a cURL request 100 times and collect the average total time.

I used the following URL: https://api.braintreegateway.com/heartbeat.json

TLS Version HTTP Version Avg Time (seconds)
TLS 1.2 HTTP 1.1 0.22898
TLS 1.3 HTTP 1.1 0.02098
TLS 1.2 HTTP 2 0.23487
TLS 1.3 HTTP 2 0.01953

Takeaways

Checklist

Authors

@scannillo