托管在 https 协议 Web 应用程序上的移动应用程序的 REST API 会很慢吗? [英] Does REST API for mobile apps hosted on https protocol web app will be slow?

查看:26
本文介绍了托管在 https 协议 Web 应用程序上的移动应用程序的 REST API 会很慢吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个通用的答案.假设我已经构建了在 Android 和 iOS 平台上运行的移动应用程序,这些应用程序的 REST API 位于基于 https 的网络应用程序下.

I am looking for a generic answer. Lets say I have built mobile app running on Android and iOS platform and REST API's for these apps lie under https based web application.

当这些移动应用尝试从此网络应用获取数据时,会不会导致任何速度或性能问题?如果我在 http 下托管此网络应用程序,这些应用程序的性能会更好吗?

Will it cause any speed or performance issue when these mobile apps try to fetch data from this web app? If I host this web app under http, will these apps perform better?

我不关心服务器性能,只关心移动应用在这种情况下的表现?

I am not concerned about server performance, just concerned about how mobile apps will behave in such case?

推荐答案

当这些移动应用尝试从此网络应用获取数据时,会不会导致任何速度或性能问题?

Will it cause any speed or performance issue when these mobile apps try to fetch data from this web app?

不显着.解密开销将被其他影响所淹没,例如网络 I/O、解析响应的负载等.

Not significantly. The decryption overhead will be swamped by other effects, such as network I/O, parsing the payload of the response, etc.

您可以通过使用 https 访问 Stack Overflow,然后使用 http(理想情况下每次使用全新的隐身"浏览器窗口,以消除本地缓存效果)来查看这一点.您应该不会注意到太大的不同.这是因为解析 HTML/JS/CSS 和呈现页面,加上网络 I/O 来首先获取所有这些东西,是占用大部分时间的事情.

You can see this by visiting Stack Overflow using https, then with http (ideally using a fresh "incognito" browser window each time, to eliminate local caching effects). You should not notice much of a difference. That's because parsing the HTML/JS/CSS and rendering the page, plus the network I/O to get all that stuff in the first place, is what takes up the bulk of the time.

如果我在 http 下托管这个网络应用程序,这些应用程序的性能会更好吗?

If I host this web app under http, will these apps perform better?

用户不应该注意到.因此,要么:

Not that the user should notice. Hence, either:

  • 运行您自己的测试以确认您的特定用例的行为,或

  • Run your own tests to confirm the behavior for your specific use case, or

默认使用加密 (https),如果您不想运行这些测试

Default to using encryption (https), if you do not wish to run those tests

这篇关于托管在 https 协议 Web 应用程序上的移动应用程序的 REST API 会很慢吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆