Spajk Posted November 18, 2013 Share Posted November 18, 2013 Well, I have put a weird title, but I couldnt think of anything else. The question I have is simple. I have some variable whose value I want to sync with a database. So, on every change I need to update the db. So, would it be better if I directly update it using MTA's db functions or to send a request to a local http server via call remote and let it handle the rest of updating. My goal is to lower the usage of MTA server, so what would be better? (HTTP, MySQL and MTA servers are running on the same machine.) Link to comment
myonlake Posted November 18, 2013 Share Posted November 18, 2013 It still spends the same amount of query power to handle it via a web server, if not more (more likely to spend more, because you're sending it from MTA to HTTP to MySQL, while it could just be MTA to MySQL). I suggest doing it on the server. Everything becomes way easier and handy, instead of having to update your web server whenever updating a query. Link to comment
Spajk Posted November 18, 2013 Author Share Posted November 18, 2013 But, I am trying to make MTA use less power, while I dont really care about the web server Link to comment
myonlake Posted November 19, 2013 Share Posted November 19, 2013 It's going to use the same amount of power everywhere, so if they're all located on your dedicated server, then it wouldn't matter where you do it. MTA is already so lightweight that I suggest doing it on MTA. I don't understand why would you want it to spend less power, because queries don't spend that much power at all. Link to comment
GiamPy Posted November 19, 2013 Share Posted November 19, 2013 I agree with myonlake. Generally, I only use HTTP when Lua is not able to do it, such as calling HTTP RESTFUL APIs. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now