Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I have developed a RESTful api that I deployed on Azure Web App. While performing the load test using JMeter, I see that the response time is huge i.e ~18secs. This response time appalls me because the endpoint I have exposed only receives a ~1-2KB of text data and enqueues it to azure service bus queue.
I have researched and found the following:
Azure Web App and Queue needs to be in the same region. Yes they are
Size of the VM matters. Mine is S3 Large
Software Design needs to be good/optimized. Controller only enqueues, no other operations
For load testing, I have provisioned a VM instance in the same region as the Azure Web App to minimize the latency. The enqueue statement takes time in the order of milliseconds, so I wonder what is taking the extra seconds while the serivce is in load?
EDIT: My code creates a single instance of QueueClient which I reuse for all requests. The code is just the following two lines inside an ApiController
ServiceBusManager.GetQueueWriter().Enqueue(data); //data is no more than ~1KB
return Request.CreateResponse(HttpStatusCode.OK, "Data enqueued");
There can be several possible reasons:
Your Azure VM simply gets overloaded (i.e lacks CPU or RAM) so make sure it has enough headroom to operate. You can monitor VM resources consumption using Azure Diagnostics Extension or JMeter PerfMon Plugin
Your JMeter machine is overloaded. Default JMeter configuration is good for tests development and/or debugging, when it comes to load testing make sure you're following JMeter Best Practices.
The problem could be in your application code, re-run your test with profiler tool telemetry (i.e. using YourKit .NET Profiler) - this will allow you to detect the heaviest methods, largest objects, slowest DB queries, etc.
Infrastructure configuration might not be suitable for high loads. Check your application server, database and other middleware settings and make sure there are enough threads to serve virtual users generated by JMeter, otherwise requests will be queuing up.
Related
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 7 days ago.
This post was edited and submitted for review 5 days ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Question:
Can the below architecture be used in production?
Mobile app serviced by Firebase(FireStore + CloudStorage) and Cloud Functions for http calls to the external API) +
AchivementsApi deployed on Appengine standard conencted with CloudSQL.
Context:
I wrote two apps that have to be used as digital support for offline gaming events.
Expected usage pattern:
The traffic starts increasing at the beginning of the week when users have to do some online tasks, then a big spike will happen in the weekend when the offline gathering is taking place. We expect to have thousands of users. In the most optimistic case, let say we will reach 8000 users.
Flutter Mobile App
a. Authentication/Profile – for this I choose Firebase as is free and scalable (also this option provides monitoring, alarms, push notifications, etc.)
b. Event related data that in most cases will not change (event timetable, exhibitors, infos... nothing intensive here) – Using the Firebase backend with Cloud Firestore db looks like the obvious choice.
c. Images can be stored on Cloud Storage or even packaged with the app
d. Integration with Achievements Api – this implies sending REST requests to the below java service, using api key for auth. A scalable and safe(storing the api key) option for this seems to be Cloud Functions. Of course, if I opt for the dedicated back end deployed on Cloud Engine or App Engine or somewhere else that service can handle the Rest calls also
Springboot Achievements Api
Service with some complex queries but no process is extremely intensive or time consuming. This must be a stand alone service available for future integrations. Due to the choice made above of using Firestore, I was thinking that this can be deployed on stantard AppEngine environment with Cloud SQL connection.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I'm currently working on Google cloud platform. Periodically, I plan to execute a function which will insert and update positioning data on my Google cloud storage.
Then, I want to make these data available through a simple website with an URL. I see on Google cloud platform (https://cloud.google.com/solutions/web-hosting) some way to make website (WordPress on Compute Engine, LAMP stack on Compute Engine, Cloud run, Compute engine, App engine and firebase hosting) but I didn't understand well which solution will be better for me.
Can you enlighten me?
GCP has different products for different use cases which in most cases are designed for building more complex solutions which are scalable horizontally and vertically.
Based on the application you want to build you have to choose each building block taking into account it's properties and your requirements.
To cut the long story short if you want to host simple static page I suggest you:
Create a bucket on GCS
Add permission for allUsers to Storage Object Viewer
Edit websiste configuration for the bucket setting up index.html and 404.html
Of you go, your bucket is available publicly to everyone, cost you whatever space and traffic you will use above the free tier.
Here you will find detailed info about the steps you need to take from goodle:
https://cloud.google.com/storage/docs/hosting-static-website
Cloud Run, GKE, App Engine leave for the moment when you know that you need them for some reason.
Google App Engine (GAE) is a PaaS (Platform as a service).
In simple terms, it is like someone giving you a functioning computer where everything has been configured and all software has been installed (OS, memory, hard disk, etc) and the person is also responsible for maintaining it (adding more memory when it becomes slow, adding more hard drive when the storage becomes full, etc).
All you have to do is run your program on the machine.
Google Compute Engine (GCE) is an IaaS (Infrastructure as a Service).
In simple terms, it is like someone dumping all the different hardware and software needed to assemble a computer on a table. You are then responsible for figuring out what you need (how much storage you need, how much memory you need, which OS you need, etc) and picking those from the table and assembling a computer to run your program.
After you have assembled the computer and your program is running, you also have to monitor it and determine if more hardware or memory is needed and then add those.
Based on what you have described, I would recommend going with GAE. Your use-case looks like a simple situation of a front end (website) to display data from storage. Also, the fact that you asked this question, gives me the impression that you're not extremely knowledgeable about Google Cloud products (i mean no disrespect) so you want to use something that is simple and straight-forward (i.e. a solution where Google handles all the heavy lifting).
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 6 years ago.
Improve this question
Should I use google charts in production environment?
Google charts are very easy to use.
https://google-developers.appspot.com/chart/interactive/docs/quick_start
But is it recommended to be used in a production environment?
The API's are not hosted in house but called form google servers.
There is a risk of google changing them or discontinuing them.
I couldn't find any license agreement to use.
Is the data secure as the data is being sent to google servers.
Are the above real risks or am I over thinking.
I was wondering if anyone has any experience with using google API's in production. Or if anyone can give some recommendations.
The Terms of Service cover some of your questions. Basically, Google's deprecation policy says that the API will be available for 3 years following deprecation (and most of the API - namely, the Interactive Charts API - is not deprecated; the old Image Chart API is, however).
For data security, most charts in the Interactive Charts API do not send any data to Google's servers, though there are exceptions. Each chart's documentation has a Data Policy section which explains what, if any, data is sent to Google (examples: AreaCharts, which do not send any data; and GeoCharts, which may send data if you use the geocoding features). Charts in the Image Chart API do send data to Google's servers, as they generate the images server-side rather than client-side, but this API is deprecated anyway, so you probably shouldn't be using it.
The main risk with using the Visualization API in my experience is that you have (practically) no control over versioning. When the development team releases an update, everyone everywhere gets the update. Usually this is a good thing, as it brings new features, bug fixes, and performance enhancements to everyone. Occasionally, however, a new release may introduce a bug, or change the behavior or appearance of a chart in some way that is undesirable for your application. When this happens, you generally cannot roll back to the previous version. For projects that are under active development for long periods of time, this is generally an acceptable trade-off for the free (as in beer) chart API. For projects that do not have a long-term maintenance budget, this can be problematic.
If your user-base is in an area that has poor connectivity to Google's servers, having the API hosted remotely could be problematic, but in general this is not the case.
I have used it in a production environment. All the questions you have posed are very real possibilities. For use it came down to budget, the money was there to purchase a system so we went with what we could afford at the time. The direction you go really depends on budget and existing systems that might be able to achieve the same thing.
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 7 years ago.
Improve this question
I would like to know the differences between Mashery, WSO2 and 3scale. Someone who has used API Managers before can give his opinion? What are advantages and disadvantages of each one
thanks
cheers
Not sure, but this question might end up flagged as off topic - vendor comparison, but anyway I'll jump in. I work at 3scale (full disclosure) but hopefully this is useful anyway - the three are pretty different. Trying to be as neutral as possible!:
3scale uses NGNIX and/or open source code plugins to enforce all of the API traffic rules and limits (rate limits, key security, oauth, analytics, switching apps on and off etc.) and the traffic always flows directly to your servers (not via the cloud) so you don't have additional latency or privacy concerns. Because it's NGNIX it's also widely supported, very fast and flexible. Then it has a SAAS backend that manages all the analytics, rate limits, policies, developer portal, alerts etc. + synchronizes across all the traffic manager nodes. It's free to use up to nearly 5million API calls per month.
WSO2's system is an additional module to the WSO2 ESB so if you're using that it makes a lot of sense. It runs everything locally with no cloud components - a pro or a con depending on how you see it. It's also been around a lot less time and doesn't have such a large userbase.
Mashery has two systems - the main one with which the API traffic flows through Mashery's cloud systems first and has traffic management applied there. So there is always a latency heavy roundtrip between the users of the API and your servers + it means Mashery is in your API traffic critical path. They also have an on premise traffic manager but it's much less widely used. Both solutions have very significant costs and long term commitments.
As 3scale what we see as the main advantage is you have a tons of control as to how you set up all the traffic flow and never have to route through a third party plus you have the benefit if having all the heavy lifting hosted and synchronized across multiple data centers. We're also committed to having a strong free for ever tier of service since we want to see a lot of APIs out there! http://www.3scale.net/
Good luck with your choice!
steve.
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 3 years ago.
Improve this question
I have read a couple articles and I know the basic concept of cloud computing..But I still don't know what exactly I can do with this service.
As a mobile application developer, I have developed a couple of iPhone applications. I have a Bluehost account and I have MySQL database in there. I have a couple PHP scripts on my server and on device side, it sends http request to the server to get the data from database in XML format. That is basically how I designed and implemented my applications..
Now what can I do with a cloud computing? If I use a cloud computing service such as AWS then how it is going to change the structure of my application?
Thanks in advance...
Cloud computing doesn't necessarily have to change the structure of your app. The main benefit of cloud computing in a lot of cases is scaling.
Right now if your iPhone apps become really popular and overload your current host, what do you do?
Using the cloud, you could spin up new instances (servers) on demand almost instantly. Another benefit is you only pay for what you need. Of course, depending on the situation, it might require changes to your structure to take advantage of scaling features.
edit: Specific to AWS, they have a service called Elastic Load Balancing. Take a look: http://aws.amazon.com/elasticloadbalancing/