问题描述
我正在寻找一个通用的答案.让我们说我已经建立了在Android和IOS平台上运行的移动应用程序,并为这些应用程序的REST API LID在 https 的Web应用程序下.
当这些移动应用程序尝试从此Web应用程序获取数据时会导致任何速度或性能问题?如果我在 http 下托管这个web应用程序,这些应用程序会更好吗?
我不关心服务器性能,只是关注移动应用程序如何在这种情况下表现?
推荐答案
当这些移动应用程序尝试从此Web应用程序获取数据时会导致任何速度或性能问题?
没有显着.解密开销将被其他效果淹没,例如网络I/O,解析响应的有效载荷等.
您可以通过使用https访问堆栈溢出来查看此,然后使用http(理想地使用每次新的"隐姓埋名"浏览器窗口,以消除本地缓存效果).你不应该注意到很多差异.这是因为解析了HTML/JS/CSS并渲染页面,加上网络I/O首先获得所有这些东西,是占据大部分时间的原因.
如果我在HTTP下托管这个Web应用程序,这些应用程序是否会更好?
不是用户应该注意到.因此,要么:
-
运行自己的测试,以确认特定用例的行为,或者
-
默认使用加密(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.
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?
Not significantly. The decryption overhead will be swamped by other effects, such as network I/O, parsing the payload of the response, etc.
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.
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
Default to using encryption (https), if you do not wish to run those tests