Hi,
I have set up a site using Openresty and MySQL using lua-resty-mysql. The site will receive about 30 million POST requests a day. I want to load the data from each such request into MySQL database.
The data posted will be in the following format -
[
{"TRANSID":"14507226013384557","HEADER":"1234","RESPONSE":"OK","TIMESTAMP":"1450791482"},
{"TRANSID":"14507226013383534","HEADER":"1235","RESPONSE":"OK","TIMESTAMP":"1450791482"},
{"TRANSID":"14507226013385581","HEADER":"1236","RESPONSE":"OK","TIMESTAMP":"1450791482"}
]
The table has TRANSID, HEADER, RESPONSE and TIMESTAMP columns. The above data should insert 3 records into my table with the columns taking appropriate values.
What is the best way to do this using lua-resty-mysql? I need an optimized solution as the number of requests is huge.
Thanks,
Vaibhav