IBM Cloud: How to deploy a multi-region app? - kubernetes

I need to configure the multi-region Kubernetes deployment. My services use IBM Watson. But Watson does not provide a global instance. It based on the region. Am I to use two different Watson for two regions?

Depending on why you want to deploy a multi-region app and what type of IBM Watson service you want to integrate, there are different options available. There is an IBM Cloud solution tutorial with strategies for resilient applications which might be a good introduction and with related links.
If it is for resiliency, you would need to check what SLAs and deployment model the service in question offers. Depending on the IBM Watson service the APIs are stateless or require to open a session. Thus, the application design needs to take that into account.
If it is for performance for a global audience (app users), you might need to look into how to split traffic, cache answers, or deploy services and app instances closer to the user.
Without any details from your side it is a pretty broad question and hard to answer.

Related

Can I deploy multiple front-end apps (web/mobile) with 1 back-end on the same server?

I need some help with deciding on the architecture of my project (a web app for unlocking discounts). I am first planning on creating the website (React for the front-end & Django for the back-end, PostgreSQL database). In the future, I may create a mobile app too for Android & iOS (unsure what front-end framework yet).
So I have decided I want the front-end and back-end to be completely separated so the back-end is a REST api. This will allow me to not have to create multiple back-ends for mobile apps.
But, after researching, I have found that this could be quite expensive in terms of server costs. This is a new business and I am the only developer so funding isn't high. So I was thinking that I could deploy the front-end & back-end on the same server but as separate apps that talk via nginx?
I have 4 questions about this:
If I do this, would it still be possible to reuse the back-end as a REST api for the mobile apps or is that a no because it's linked to the web front-end?
If it is possible, would I be able to host the mobile front-end in the same server (so have everything hosted on 1 server)?
Is this a stupid idea - would I just be better off deploying everything into separate servers in the long-run (to reduce load)?
Should I just worry about this in the future? And for now just deploy the separated web front-end & back-end to the same server.
I have never really deployed anything into a real life production environment so I'm sorry if my questions seem silly. I haven't started development yet but I want to think about scalability & future extensibility before I start. Thank you.
Nowadays I'd go with a serverless approach. Instead of having servers to maintain you can focus on your app functionalities.
There are a lot of options. You can check, for example, AWS Amplify (https://aws.amazon.com/amplify/) or Netlify (https://www.netlify.com/) for a more "full-stack" approach.
In AWS, you also can keep separated projects, having your backend in lambdas and your frontend served through S3 + CloudFront. You also don't have servers to care about.
There are only examples of how you can solve your problem without servers, but answering your questions:
You can reuse your APIs regardless of the way your app is deployed. It will be more related to how you designed them;
Yes, you can host everything in a single server if you want, but I really don't recommend that;
If you don't want to pay for 24/7 servers, you can go for a serverless approach;
As I told you before, you can do what you want without worrying about servers.
Your main point of focus is to keep the cost lower and to implement a good solution also. My suggestion would be to look for AWS Lightsail. Lightsail offers fixed price VM which you can configure yourself, and it starts from $3.5 / month at the time of writing this answer.
My answers to your questions
If I do this, would it still be possible to reuse the back-end as a REST api for the mobile apps or is that a no because it's linked to the web front-end?
Yes, it's possible. Keep the frontend and backend in different repo, and you can deploy it as docker instances on the same server. You will have 1 frontend docker container and 1 backend docker container, and they can communicate with each other.
If it is possible, would I be able to host the mobile front-end in the same server (so have everything hosted on 1 server)?
For mobile, you will develop a mobile application which you can publish to playstore or deploy to smartphone. Your app can then call the backend service and get the JSON in response. So you have to design your backend in such a way that it can serve data to both requests.
Is this a stupid idea - would I just be better off deploying everything into separate servers in the long-run (to reduce load)?
For long term and design perspective, you need to consider factors like scalability, maintainability, security etc.., so its always better to have multiple server to avoid single point of failure.
Should I just worry about this in the future? And for now just deploy the separated web front-end & back-end to the same server.
My advice to you will be to think carefully now, so you don't get nightmares in the future. Invest your time now and design a stable solution which could help you in long-term. As you mentioned that its a small business, but your solution should be able to easy handle growth.
My suggestion
As suggested by the Paulo, S3 + CloudFront looks good for frontend. You can get 1 year free CDN using Lightsail.
For Backend, you should at least have 2 (I will suggest minimum 3) servers and deploy backend docker containers. You can use docker compose to automate the deployment. If you want to orchestrate then Docker Swarm Mode is best. With this you will avoid single point of failure. You can get very affordable servers from Amazon Lightsail
For database, you need to make it scalable. To ensure scalability and High Avalability we should have replicated DB. Minimum 3 DB instances will be good starting point. MongoDB is a good choice. With simple configuration you can enable DB replication. 1 Master 2 slaves instances.
1 Load-balancer in front of your servers to distribute the load. To save the cost you can configure the Load-balancer yourself but this will add learning curve and you will have to spent time and understanding the details. The better solution is to use a managed load balancer. Lightsail offers Load Balancer for $18 / month at the time writing this answer.
The above mentioned solution is cost-effective and will give you long-term benefit and also you can estimate the cost based on your solution.
Obviously, this can still be improved but I tried to cover the necessary aspects of the question asked.

API support for Bluemix Availability Monitoring service

I am looking for API support for Bluemix Availability Monitoring service to report availability across all components of the service. Currently I need to individually select every application to see the availability. The availability reporting is for SLA.
I could not find any reference to APIs. Any pointers would help greatly. Thanks.
Availability Monitoring doesn't currently expose any APIs, but it is in the roadmap to do so in the future. For now, you can get a "global" view by choosing 1 app (even a stopped dummy app), and put all your tests there. You do not need to create the tests in the actual app that is monitored. If using the Lite/Free plan, you may run into test point limits using this approach.

Get Watson Conversation Workspaces

I am using Watson Conversation services on Bluemix. We have multiple Conversation workspaces within the service to enable better segmentation of the problem space.
I need to load information on the set of available workspaces within the Conversation service (e.g. name, workspace ID) to allow me to target the appropriate Conversation API endpoint. I've been trying to find a Watson or Bluemix API to allow me to retrieve the information directly but have not had any success.
Does anyone know if it is possible to retrieve this information programmatically and if there are any best practices for doing so?
We don't have an exposed endpoint for this capability at this point. It is something being discussed internally, however.
The API for managing Conversation workspaces is now available. It is possible to list workspaces, to create/update/delete a workspace and to download an entire workspace. The API is supported by the Watson SDKs.
Using the new API, I wrote a small tool for managing Conversation workspaces. The tool shows the API in action. The source is available on GitHub to demonstrate how the API can be of use.

Dynatrace Performance Metrics

I am looking for the performance metrics that can be monitored using Dynatrace Application Monitoring tool. If they are categorized for different tiers (Web Server, Application Server, Database Server) that would be nice to have.
Any help is highly appreciated. Thanks in advance.
Dynatrace has a concept of Measures. Depending on the type of measure, e.g: # of SQL Calls we tell you which server caused these calls (App SErver 1, App Server 2, ...). For basic monitoring metrics such as CPU, Memory, Throughput, ... we also capture this for each individual tier.
If you put these measures on a chart you can select for which application, agent or agent group you want to show them. There is a drop down box in the Measure Selection Dialog.
Let me know if you want to know more. Also - feel free to use our own discussion forum on our community. A lot of these questions are already answered there: https://community.compuwareapm.com/community/display/DTFORUM/dynaTrace+Forums+Home
Dynatrace has the starter guide. You can examine from the link below for different tiers (Application Server, Database, Web, Service, Process etc.)
Dynatrace Starter Guide
Regards

PaaS : How to build?

I wanted to make a web application through which :
user(end user) can create his own
web application online.
which will be integrated with the
databases and application/web
servers
and user can also publish that
application withing that application
only...
Doing some research i come to know it goes under category of PaaS(Platform as a Service)
But i am confuse how can i do that ?
I want to build that application using Java/J2EE.
Can any one explain me from where should i start ?
Or which framework / technology is better to implement it in Java ?
Waiting for your helpful reply....
There are several options as far as choosing a PaaS - each PaaS vendor has its pros and cons, so you need to consider a range of issues:
Language support - Do you want just Java or maybe additional languages/frameworks?
Hosting - Are you going to use a cloud computing provider like Amazon Web Services? Or are you using your own hardware? Or do you want multiple options?
DB support - You mentioned using a central DB. Do you plan on installing/administering this DB yourself, or use a hosted DB service? Do you need the PaaS to support the particular DB you want? Perhaps you need multiple Databases to provide scalability and separation among clients?
There are several good comparisons of PaaS vendors out there. This might be a good place to start: Looking for PaaS providers recommendations
Full disclosure: I work for Cloudify, an Open-Source PaaS provider.
I think while choosing a PaaS you should think of the below points.
It should be easy to deploy, scale and manage
Scaling
Flexible topology
Data safety
No vendor lock in
Open software stack
I suggest you, before going to any big vendor try a new player in town Jelastic. I recently used their services and continue to do so and they are just awesome. Their web UI is best in class and has no drama of API, SDK or downloadable software. Let me know if you use them so that I can also have some feedback before I migrate all our apps to them.
Surya
As far as i understand, you are looking for a solution that Viravis is currenlty implemented.
But believe me it is not an easy task to build that kind of platform. i strongly suggest you to look at some PaaS providers to get involved and build a business relationship to achieve your goal. They are just exists for this purpose. Provide platform for people who just want to develop a single online application or some professional who want to build an SaaS business.
I think it is better to hire the platform rather than build it from scratch (ofcourse if you dont have to...)
A web application consists of language, framework, database and Web-server.
If you want to make a web application in java, you should try GRAILS framework.
Its fast and web development is very easy and you can use java code as it is, in it.
Secondly you can choose database from MySQL, PostgreSQL etc or if you want to use No-SQL dbs, you can choose from MOngoDB, CouchDB etc.
Web-Servers can be tomcat, jetty etc.
After creating you application, you would like to host your application on web, Here PaaS comes to play. It helps you to deploy and host your application on web. So what you have to do is only to focus on your application and then deploy your app on any PaaS providers.
There are many PaaS providers in market, you can choose any.