Dreamfest performers Alicia Keys and Lenny Kravitz are a tough act to follow — especially at 8:30 a.m. the morning after their concert. But during their Dreamforce session on November 8, 2017, Senior Director Prem Veeramani and Principal Architect Satish Raghunath did put on a compelling show, where system performance took center stage, and they shed light on it from two angles.
- How Salesforce scales its infrastructure to meet evolving performance demands
- How Salesforce uses EDGE (formerly Twin Prime) to improve network performance
Meeting Evolving Performance Demands
“The data that you have today is very different from the data that you have tomorrow,” Prem said. And that data is multiplying — and will only continue to multiply — due to a proliferation of Internet of Things (IoT) devices and increasing business complexity. To scale with that data growth, Salesforce expands and tunes its infrastructure based on these strategies.
This type of scaling involves adding servers or storage to the Salesforce infrastructure on demand. (In other words, it’s based on quantity.) Although keeping each customer on a single node offers some performance benefits, some Salesforce orgs are too big to be supported by even the most powerful server. For a given org of that size and scale, Salesforce securely shards data on multiple database nodes, which is much more difficult than general, non-database sharding.
This type of scaling involves using newer-generation, more powerful servers, which have more CPU cores, memory, or network bandwidth. (In other words, it’s based on capability.) The continual refreshing of Salesforce hardware at regular intervals falls under vertical scaling. For example, for storage, Salesforce scaled vertically by using Flash arrays instead of SAS arrays, allowing for significantly greater throughput.
Application & Database Tuning
Salesforce optimization doesn’t stop at hardware! Here are just a few of the software-related strategies that Salesforce uses to improve performance.
- Release-over-release tuning — In weekly patch releases, Salesforce delivers fixes to performance issues that were surfaced (or forecasted) by monitoring tools. Again, thanks to the multitenant infrastructure, Salesforce can easily roll out these fixes to all its customers.
- Tuning Garbage Collector algorithms — Salesforce engineers continually tune these algorithms to “squeeze every bit of performance optimization out of our application layer,” Prem said.
- Parallel queries — Sometimes, parallelizing everything can hinder performance, so Salesforce carefully tests and chooses which applications use parallel queries.
- Auto Query Tuner (AQT) — Here, “AQT” isn’t someone you had a crush on in high school. It’s the next-generation, automated tuning tool that Salesforce uses to deliver optimal database performance at scale. AQT has been running constantly on Salesforce since January 2017, and since then, 87% of the queries it tuned had their run time reduced by 50% or more.
Taking Network Performance to the EDGE
“Now that most organizations are global, you find your customers on the move, accessing your data from all parts of the world,” Satish said. EDGE can help improve those customers’ network experience.
Example Highlighting EDGE’s Possible Impact
Consider that your org’s data is in the United Kingdom, and one of your customers is trying to access it from Tokyo. Assume that the round-trip time (RTT) for each call to the UK facility from Tokyo is 125 milliseconds.
- Without an EDGE network hop in Tokyo, three round-trips are required just to set up a connection (one for TCP setup and the other two for TLS setup), totalling 375 milliseconds. Again, that’s before the customer’s request actually goes through.
- With an EDGE network hop in Tokyo, the connection setup time is cut from 375 milliseconds to just 75 milliseconds. To see how significantly that change improved download times for files of various sizes, check out the session recording!
How EDGE Works
What puts the “hop” in an EDGE network hop?
- TLS termination — TLS (Transport Layer Security) is what Salesforce customers use to establish secure connections. With EDGE, those secure connections can be terminated closer to where your users are, cutting down on the time required for connection setup. As a pilot customer for TLS termination in production, Salesforce chose its Help & Training portal, where EDGE greatly reduced average download times.
- Caching static content — What companies can cache is subject to regulatory and compliance requirements, but even within those constraints, compliant caching that serves up content closer to your users still provides real benefits, similar to those that a CDN (content delivery network) delivers as a standalone service.
- Route optimization — Salesforce automatically sends users to the most optimal point of presence based on its network data. Making that decision seems obvious, but it actually involves measuring network latency and factoring in topological information.
- Machine learning — With machine learning, EDGE looks at incoming data, creates models that fit that data, and then makes decisions based on those models. In deploying EDGE machine learning in production for the SalesforceA for Admins app, Salesforce saw significant performance improvements in both the United States and Japan.
- Network peering optimizations — To get as close to end users as possible, Salesforce sometimes works with — and makes direct connections to — major network providers. For example, in China, Salesforce has partnered with China Telecom. The optimizations from these shorter connections lowers user-experienced latency significantly.
Next Steps for EDGE
This section looks to the future, but you should make your Salesforce purchasing decisions based only on what’s currently offered and available. (If you attended any Dreamforce sessions, you’re probably very familiar with the “Forward-Looking Statements” slide, which Prem said were so omnipresent that you might even be seeing “in your dreams as well.”)
- TLS termination and caching of static content — Salesforce is expanding its internal rollout of TLS termination and caching of static content, and will likely deliver the same services to certain customers by invitation in 2018.
- Route optimization — Salesforce is continuing to gather additional data about route optimization through a pilot with customers.
- Machine learning — In 2018, Salesforce intends to roll out machine learning optimizations to the flagship Salesforce app (for both iOS and Android).
You and your customers rightfully expect to access Salesforce data and applications quickly and easily, no matter where you are in the world. To scale with data demands — which are increasing as IoT devices proliferate, and businesses become more complex — Salesforce continually expands and improves its infrastructure through:
- Horizontal and vertical scaling
- Application and database tuning
- EDGE, which boosts network performance
Salesforce will continue pursuing these strategies throughout 2018, so stay tuned for how they’re evolving to meet the evolving needs of you and your business!
Check out the recording of the Optimizing Global Performance for the World’s Most Trusted Enterprise Cloud presentation!