I've built a website using node js and it has two parts. one for users and one for website administrators for editing content on website that is locked by a login page. The user side, loads data from local json file and administrators side, loads data from mysql database. I want to know is it better to use mysql on both sides for increased performance? I am new in programming and I'm a bit confused between mysql Connections and Pools. Which one is better for performance if I have a lot of users receiving data?
this is the function for receiving data:
function getAllProductsLocal() {
try {
const products_json = JSON.parse(fsExtra.readFileSync("./public/assets/JSON/products.json"));
return products_json;
}catch(e) {
throw e;
}
}
and this is an example of the data I'm storing in JSON file:
{
"ID": 19,
"Cost": 212,
"Sizes": "[4,7]",
"Category": "man",
"Color": "blue"
}
there will be a hundred of them