Deploying a static React JS app to Google Cloud Platform (GCP)? - reactjs

I have a ReactJS app that I have deployed to GCP at Google App Engine, via the command:
$ gcloud app deploy --version 1
And it is working fine. However the app does not use a database. It takes the data from API requests from external sources via Axios library.
I would like to know if it is more efficient in terms of costs and performance, to deploy the app to a storage bucket, as a static build? Would it be able to handle more requests with less cost? Or if does not make any difference?
Thank you in advance. Best

It's really hard to answer to so broad question, every solution can contain many details that will change costs.However Google gives tools to be able to analyze it depending of details of your solutions.
First thing is calculator which in helps you to estimate cost of particular technology used and if you know all technologies in your stack you can estimate total cost easily.
2nd thing is that you might don't know how much traffic, resources will be used by technology you will choose. This I can only imagine can be estimated by tests. Then you can use Cloud Monitoring to find how much resources your solutions will use.
I hope it will help!

Related

Most cost effective way to deploy to Google Cloud Platform?

I'm really new to deployment and I wanted to see if anybody had some experience cutting costs. By requirement, I need to use Google Cloud Platform and the frontend team is writing all of their code in React/React Native. I plan on creating a REST API with cloud SQL and Node.js. Any advice on whether these technologies are a good choice would also be appreciated.
I've been reading about App Engine and Compute Engine recently and I've been having trouble estimating the cost of deploying this project. Currently, the plan is to deploy my Node.js code to app engine and use cloud SQL functionality. Would it be a better idea to deploy all code to an ubuntu server in compute engine? I am very new to deploying web apps, any and all advice would be greatly appreciated!
The GCP Pricing Calculator is the best way to work out what a proposed solution will cost for you. As an example, here is a GAE+Cloud SQL HA pricing ($113/month), and here is a single GCE pricing ($30/month).
Bear in mind that this pricing does not include the "Always Free" basic usage.
As a word of caution, you should also think about reliability, scalability and portability as well as cost. For reliability, try and avoid "single VM" solutions as if the VM is broken or a zone unavailable, your application will be completely down. For scalability, single VM solutions are also problematic unless you plan to be able to shard your workload later. For portability, you must be careful when using Google-specific technology like App Engine or Datastore which can be hard to move away from. These are complex topics which I'm only touching on to give you an idea of the kinds of things you can think about when choosing a solution.

How can I Google App Engine performance improved?

I currently has serviced my app in Korea.
But, my app is installed in us-central because GAE not supported install for Asia.
so, i suppose it is very slow because it is faraway from GAE.
If that's problem, how can I solve this problem?
please suggest to me... thank you.
I have been using Google Cloud Platform for 4 years now, Including the Google App Engine. The performance of your application backend system can only be slow if the developer did not optimise the program well. I would suggest that you try out using some of the following key aspect in solving your problem:
Try so much to use MemCache for requests that are common to users and do not require instant real time updates.
Look at the algorithms you are putting in place. This is very important for your execution through put. For example lets say you want to run a search though a billion records, u can use quick search algorithms like QuickSort3way.
Lastly look at the choice of database you are using. You could mix NoSQL with SQL if you were only using SQL. If you are into big data then use BigQuery. This way your application's performance can drastically increase and scale up enormously.

Which is more cost-effective for a mobile backend: Parse or Google Cloud endpoints?

So me and my partner are working on a mobile app.
And I'be been wondering which mobile backend is a better solution. The problem I see with Parse is that when there are high amounts of traffic in a short period of time, we would need to manually adjust the number of requests per second constantly. And it seems really expensive.
Google Cloud endpoint seems like a good solution, but the api would have to be custom coded and I'm not sure how much it would actually cost.
Then there is Kinver and other services. I'm not sure what code they use, but iv'e heard native code is better than javascript when it comes to making more reliable mobile apps.
As you can see here, Google Cloud Endpoints are completely free. You only will need to pay for your back-end in Google App Engine or in Compute Engine.
But definitely, the prices will be lower than those offered in Parse, except the "free" tier. But once you would need more than 30 request/sec (which is obviously not such a high limit), the prices go up quickly.
Another advantage is that in the Google Cloud you may code your back-end in Java, Python, PHP or Go, or in other languages if you go for the managed VMs option.
Lastly, you would have many other products to use if you need them in the future.

For a machine learning or NLP application -- Google App Engine vs Heroku vs App-fog

I have tried basic web applications on all the above three. If I were to rank them by convenience or freedom they provide then:
Google App Engine
App Fog
Heroku
But when the application domain became large the ranking actually changed. I am having huge troubles in using sklearn, nltk or gensim on GAE.
I am not very much experienced with Heroku and probably that is why I am having troubles in debugging errors where as GAE provides a console that really helps in debugging.
As far as app-fog is concerned it is pretty direct and to the point. But again what I noticed was that when I shared the link of the web-app almost everywhere it was being blocked by antivirus/firewalls!
Or maybe I am going wrong somewhere !
I need some suggestions please
How are you using sklearn, nltk, or gensim? You may want to consider a platform designed for high performance scientific computation, such as PiCloud.

Web Scraping with Google App Engine

I am trying to scrape some website and republish the data as a RSS feed. How hard is this to setup with Google App Engine? Disadvantages and Advantages using GAE. Any recommendations and guidelines greatly appreciated!
Google AppEngine offers much more functionality (and complexity) than you will need if truly all you will want to do is republish some structured data as RSS.
Personally, I would use something like Yahoo pipes for a task like this.
That being said... if you want/need to get your feet wet with GAE, go for it!
Working with Google App Engine is pretty straight forward. I would recommend going through the Getting Started guide. It's short and simple and touches on essential GAE topics. There are more pros and cons than I will list here.
Pros:
In general, App Engine is designed for high traffic web applications that need to scale. Furthermore, it is designed from a programmer's perspective. Much of the scalability issues (database optimization, server administration, etc) are dealt with by Google. Having said that, I find it to be a nice platform. It is still being actively developed by Google engineers, and scheduling of tasks (a feature that has been long requested) is in the current road map.
Cons:
Perhaps the biggest downside right now is again the lack of official scheduling support and the quota limits currently set for free accounts. However you can't complain much if its free. Currently it only supports Python as a programming interface (although a new language [Java I predict] is coming soon). Furthermore, Python 2.6 (and 3.0 for that matter) are not yet supported. In addition, Django 1.0 is not officially supported in App Engine (although you can package Django 1.0 with your application).
Harder than it would be in most other technologies.
GAE can sort of do scheduled batch stuff like this now, but it's really not intended for that type of thing. Pick pretty much any other language and platform for this particular task, and you'll make your life a lot easier.
I think BeautifulSoup could run on GAE, so all your scraping needs are handled :D
Also, GAE has a geturl thingy. The only problem I think you might have is not having enough time to get the data (30 secs limitation).
I am working on a same project and I've decided that it's easier to prepare the data on another server and push them to GAE.
You might also want to look into Yahoo! Query Language (YQL)

Resources