Closed nathanhilbert closed 8 years ago
with fetching dataset models and calculate clusters
Transactions: 2800 hits
Availability: 100.00 %
Elapsed time: 59.17 secs
Data transferred: 86.75 MB
Response time: 1.05 secs
Transaction rate: 47.32 trans/sec
Throughput: 1.47 MB/sec
Concurrency: 49.53
Successful transactions: 2800
Failed transactions: 0
Longest transaction: 3.99
Shortest transaction: 0.46
ready to test and merge.
Nice. I see you enable CORS for the front-end requests. How are you hosting the front-end at this point? I believe we should be able to direct users to the UI via node and not have to worry about CORS.
In production, all static files get diverted to CloudFront on AWS, so no flask server load there. Only the data-viz template is delivered and that has some server-side scripting that has to go through flask.
In production, the same can be done for the node api calls using haproxy as static files. Anything with url /api/5/slicer/* gets directed to the node application directly. In this case, there will be no problem with CORS since it will come to the same domain:port, but we can keep it in there for other devs who might be using the API in the future.
Curious if this is the route that we are taking? If so, I can continue to work on this branch by cutting out a lot of library imports to the flask application, which will speed that up as well.
@nathanhilbert Yes, this is the route we are taking
Most of the components of migrating the API to nodejs. Looks like @mdramos was right to think node as it cuts out a lot of the flask start up requirements when they aren't useful (see below for benchmark). This would definitely be a move to more of a microservice with pluses of isolation and minuses of more servers running.
To do