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

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

问题描述

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

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.

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

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?

推荐答案

这些移动应用尝试从此Web应用中获取数据时,是否会导致速度或性能问题?

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,然后使用http(最好是每次使用一个新的隐身"浏览器窗口,以消除本地缓存效果)访问Stack Overflow来查看此内容.您应该不会注意到很大的不同.那是因为解析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下托管此Web应用程序,这些应用程序的性能会更好吗?

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天全站免登陆