如何在nodejs中使用post方法发送大数据? [英] how to send large data using post method in nodejs?

查看:429
本文介绍了如何在nodejs中使用post方法发送大数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在服务器端的nodejs中处理大型csv数据,但是由于节点是单线程cpu,使用率达到了100%.我找不到任何解决方案,所以它不会花费很多时间.因此,我决定在客户端上处理数据,然后将其发送到服务器,然后将其保存到数据库中.数据可能约为20到30 MB.是否有可能,或者是否可能是通过http发送大量数据的良好实践.我检查了这个问题,但找不到帮助.

I am trying to process large csv data in nodejs at server side, but as node is single threaded cpu uses goes to 100%. I could not find any solution so that it does not consume much time. So I have decided to process the data on client side and then send it to server and then save it into database. The data might be about 20 to 30 MB. Is it possible or if possible is it good practice to send this much data over http. I checked this question but could not find it helpful.

推荐答案

要了解发布http请求的数量,

To know the limit of post http request,

它取决于Web服务器和Web浏览器:

It rather depends on the web server and web browser:

Internet Explorer所有版本2GB-1 Mozilla Firefox所有版本2GB-1 IIS 1-5 2GB-1 IIS 6 4GB-1

Internet explorer All versions 2GB-1 Mozilla Firefox All versions 2GB-1 IIS 1-5 2GB-1 IIS 6 4GB-1

请寻找以下链接

Http POST是无限的吗?

另外,在服务器端使用诸如数据块之类的技术来获取大量数据.

Also, use techniques like data chunks for server side to recive heavy data.

这篇关于如何在nodejs中使用post方法发送大数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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