Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I have been building a web application for 50k users. My application will include:
APIs + Socket server: NestJS + SocketIO
Database server: MySQL
Frontend server: ReactJS
I'm going to choose EC2 instances for those. Could you help me to choose appropriate instances for each server (eg. t2.xlarge or ...)? My application will have 3 environments: develop, staging & production.
Thanks!
Nobody can provide the information you seek.
Every application is different. Some apps are compute-intensive (eg video transcoding), some are memory-intensive (eg data manipulation) and some are network-intensive (eg video chat). Also, the way users interact with apps are different with each app.
The only way you will know the "appropriate instances for each server" is to setup a test platform, select a particular server configuration, then simulate typical usage of your application with the desired number of users (eg 50k). Monitor each server (CPU, RAM) and find any bottlenecks. Then, adjust instance type and app configurations, and test again.
Yes, it's a lot of work, but that's the only way you'll really know what system sizes and configurations are required. Or, of course, you can simply get real users on your app, monitor it very closely and make changes on-the-fly.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 months ago.
Improve this question
I'm currently trying to decide on the best/cheapest option for a small project. I have 2 microsevices (One for authentication, one for functionality), mysql db and a React Frontend.
I'll mainly be using it as learning just for myself so I don't need a load balancer or auto scaling.
I was thinking of deploying in Kubernetes but this may be an overkill.
Another option was refactoring and using Lambda but apparently it's not ideal for Spring Boot?
Any help would be appreciated. Thank you.
Edit: My goal is to run the app for a month with not more than 200 calls a day.
An alternative is to run the services on an EC2 instance that is eligible for a free tier. Ensure to shut down the EC2 instance so that you do not lose compute credits.
In case you need a larger instance, opt for a spot instance to keep the cost to a minimum.
Please note that you will be billed for storage even when the EC2 instances are turned off.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a 10GB sql dbase and want to provide access to that data to a mobile app using a rest api.The mobile app will be used by less than 100 users. My DB is a bit sluggish as it was not built for so much data, but has grown over the years. My question is: Will the rest api create more burden for my DB?
Rest Api isn't gonna create any burden on DB if it's normal client, server things.
Let me give a quick example how's rest api works.
Client<---(REST API protocol)----->server<-----(Do query optimization to improve performance of your db and similar kind of optimization)------>db
So before Rest Api, server used to keep some data of client mostly known as session data. But it was creating a burden for server as more memory use and also it was dependent on states of user in somewhat way. mean to do certain operations user has to follow a certain steps before.
But in rest api architecture, every method/call is independent of previous call.
so basically REST architecture is an another design to communicate between 2 or more (services , clients whatever ).
So I don't see that rest api is gonna affect your db. (though again it depends on your product/service architecture design and developers quality etc.)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a laravel website and a MySQL database for it.
My website has few users, and any user has a SQL database on his computer and that database has the same name, same password, and same configuration.
Now I want my user login to my website and via website information, make changes to his SQL database on his computer.
How can I do this?
How can I connect to any SQL database on user's computer by my website?
The direct answer to your question is that if you know the details of your users' machines, you can create connection strings for them in your config file, and use those connections to open MySQL sessions on the client machines - see https://laravel.com/docs/5.5/database, section "Using Multiple Database Connections".
This assumes all the machines are accessible from your server - presumably because they are on the same, local, non-internet-accessible network.
If your user's machines are accessible from the Internet, please do not do this - they will get hacked. It's a question of "when", not "if".
It's also a pretty horrible solution from an application architecture point of view - presumably the databases on the users' machines expect certain things about the database to be true, and your application would have to guarantee all those things. For instance, your application might expect "all orders have a valid customer; all customers have a valid country code". That's hard enough to guarantee on a single database, but on a distributed system, it's really hard.
It's much better to use MySQL replication for scenarios like this.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
We have log files of mySQL database and we want to use that log files for analysis (data mining, machine learning,...)
and iam very new with that.
Can you give me instruction how to do that ?
There are a number of tools that could be useful to you depending on your requirements.
But why use the MySQL logs and not the DB directly, or have the details you are searching for go to a new 'information mining' table in the DB as the user interacts with the interface. Which could be a lot more powerful
If you wish to determine the rate of inserts / queries.
You can actually set up MySQL to log these types of events to different files (so some of the work is already done, rather than having to mine a complete log file of all events).
Otherwise you are going to want to make use of tools such as Grep.
On top of that you have a system called Lucerne (from apache) that will mine the data and search for key words. They have various different hooks for going into Java, C, and others. Its very similar to how google trawl web pages.
Otherwise if you intend to mine the data 'within' the database, then the logs are clearly not your best point of call.
The logs will contain lots of information about the users also. IP address may be more tricky, but you could cross reference the name of the user running the query and the general server logs to determine the IP of the connection.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am starting a simple windows forms application that requires a database to store inventory and purchasing records (less than 1000 items). What I want to ask is for your opinion which 'lite' database should I use for this small project, considering that the prerequisites I'll be installing in a client computer should have 'minimal' file size.
The client computer has a running OS of Windows 7, and I don't want him to install so many files, such as the .NET framework and the server that hosts the database, just to install the main application I'm currently developing.
What I'm really asking from you guys is to find out which of these two commonly known databases should I use, and look for the 'right recipe' to be used when building the installer. Thank you.
Of the two, SQLite is simpler to install and deploy. Fewer files, smaller distribution footprint and fewer configuration options to deal with (mostly because SQLite is a library that links into your application where as MySQL is a full client/server RDBMS).
SQLite is made for extremely simple database needs, and is probably a good fit based on your description.
I have never heard of MySQL Lite and a web search turned up nothing, so I will assume you meant MySQL. MySQL is a RDBS client/server system and probably major overkill unless you plan to store many records, or to have multiple people accessing the database at the same time.