Keyword

Result: 9 questions

How to run a PHP server socket script in background in linux?

Answer:

Use below command

php -f server.php

To run in background you can use nohub

nohup php server.php &

if want to kill the process you use kill

kill processid
View

Can we share sockets between processes to enable load balancing over server cores in NodeJS?

Answer:

Yes

Child processes can be spawned by using our child_process.fork() API, and are designed to be easy to communicate with. Built upon that same interface is the cluster module that helps us to share the sockets bettween processes to enable load balancing over server cores.

View

You are having multiple Memcache servers running Python, in which one of the memcacher server fails, and it has your data, will it ever try to get key data from that one failed server?

Answer:

The data in the failed server won’t get removed, but there is a provision for auto-failure, which you can configure for multiple nodes. Fail-over can be triggered during any kind of socket or Memcached server level errors and not during normal client errors like adding an existing key, etc.

View

What are the pros and cons of Node.js?

Answer:

Pros:

a) If your application does not have any CPU intensive computation, you can build it in Javascript top to bottom, even down to the database level if you use JSON storage object DB like MongoDB.

b) Crawlers receive a full-rendered HTML response, which is far more SEO friendly rather than a single page application or a websockets app run on top of Node.js.

Cons:

a) Any intensive CPU computation will block node.js responsiveness, so a threaded platform is a better approach.
b) Using relational database with Node.js is considered less favourable

View

Which of the following is correct about WebSockets in HTML5?

Quiz

 Which value of Socket.readyState atribute of WebSocket indicates that the connection has not yet been established?

Quiz

Which value of Socket.readyState atribute of WebSocket indicates that the connection is established and communication is possible?

Quiz

Which value of Socket.readyState atribute of WebSocket indicates that the connection is going through the closing handshake?

Quiz

Which value of Socket.readyState atribute of WebSocket indicates that the connection has been closed or could not be opened?

Quiz

© 2017 QuizBucket.org